Hi i hav a table , if i don't create any index so how can i found which index it wil use and is there any table without indexes
*This post is locked for comments
I think for AX2012, the recid index is always created by default.
Hi
If you don;t define an index then the database will scan the entire table every time you access that table. Always define at least one index.
If you want to find all the tables in Ax that have no indexes then you can use the following X++ code...
SQLDictionary dict;
DictTable dictTable;
;
while select dict
where dict.fieldId == 0 // only tablenames
{
dictTable = new DictTable(dict.tabId);
if ( dictTable.indexCnt() == 0 && ! dictTable.isView() )
{
info(strfmt("Table %1 has no indexes", dictTable.name()));
}
}
Regards
Malcolm Burtt
HSO ES Limited
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156