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

Announcements

No record found.

News and Announcements icon
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
    239,084 Most Valuable Professional on at

    Yes, AX 2012 supports included columns.

  • André Arnaud de Calavon Profile Picture
    304,038 Super User 2026 Season 1 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
    304,038 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans