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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

create index in table with include columns

(0) ShareShare
ReportReport
Posted on by

Hi everybody, in your experience if possible to create in the AOT structure an index in a table like this SQL script:


CREATE NONCLUSTERED INDEX [<name of your index>]
ON [dbo].[REQTRANS] ([REFTYPE])
INCLUDE ([DATAAREAID],[PARTITION],[RECID]) -- this is the point of discussion
GO

the AX version is AX2012R3 no CU

thanks, Daniele.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Yes, AX 2012 supports included columns.

  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Daniele,

    Like Martin said it is possible. Note that DataAreaId and Partition are part of the index anyway...

  • Daniele Ferraretto Profile Picture
    on at

    thanks to all for the answer, my reply arrives late because I was busy for long time.

    Unfortunately from AOT when I create a index I was able to insert fields like "recid" and setup the includecolumn to YES but where I insert field "dataareaid" and setup the includecolumns "yes" and save index, AX give me an error.

    I understand that AX automatically add dataareaid and partition if I setup the table with savedatapercompany and savedatapartition but I want to understand if it's possible setup this column like include column in SQL index.

    Thanks anyway for your answer.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Daniele,

    That's why I made my comment. When these fields are added by AX automatically, they contain the data anyway. An included column or a real index field always contains data. However an included column is not sorted. So when there is an Index suggestion like you described above, you can't add the columns as included column as it would be duplicated data in the index.

    When you just create the index like AX wants to, the suggestion to have included columns for it would disappear anyway in the missing index reports from SQL.

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

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans