web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

how to find tables without indexes in ax

(0) ShareShare
ReportReport
Posted on by 50

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 have the same question (0)
  • Suggested answer
    Malcolm Burtt Profile Picture
    1,475 on at

    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

     

  • Darren Yu Profile Picture
    on at

    I think for AX2012, the recid index is always created by default.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans