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)

Re-index from AX or SQL

(0) ShareShare
ReportReport
Posted on by 6,534

Hi

Please clarify Re-indexing from AX SQL administration form will increase the performance or Re-indexing from the SQL database server will increase the performance.

1. When Re-indexing from the AX SQL administration form my AX getting hang for a while and then getting bootup.

2. Re-indexing from SQL database server will not make my application to get hang.

3. When i create any index in SQL server, then again if i run re-index from the AX form and database sync all the newly created index via SQL server will be deleted. Is this not supported in vice versa.

Any help is really appreciated!!!

*This post is locked for comments

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

    Synchronization ensures that the DB schema corresponds to the definition in AX. Because your indexes aren't defined in AX, they're dropped. Add them to AOT and you'll be all right. The only other option would be recreating them after every synchronization.

    Reindexing from AX calls the rebuild command in SQL Server, therefore you can do exactly the same thing outside AX. Doing it at DB-level gives you more options and you can easily add it to your DB maintenance plan.

    AX hangs because it calls the rebuild synchronously.

  • rudra Profile Picture
    6,534 on at

    Hi Martin,

    When we creating the index through sql it will not update in AX bcoz vice versa its happening.

    As you said corresponds to DB schema and definition in AX synchronization drops the created index through sql, is it possible to change the DB schema and the definitions in AX

  • Martin Dráb Profile Picture
    237,908 Most Valuable Professional on at

    Again, you can only add indexes in AX. If you created them directly in database, the synchronization will delete them. Do it in AX.

  • Dick Wenning Profile Picture
    8,705 Moderator on at

    create the index first time by synchronizing the DB from AX

    from that time it is up to the maintence tasks of SQL

    you have rebuild and reorganize, a rebuild will also update the statistics.

    also with rebuild from SQL you can influence the fill factor

  • Suggested answer
    rudra Profile Picture
    6,534 on at

    @ Martin , so we can conclude it by creating the index in AX and sync the DB as well as per the best practice and rebuilding index from the SQL maintenance plan is best way as well.

    @ Denis , i have set the Auto Statistics to be True for my Ax database, so this will be updated instantly.

    Thanks to all for the timely responses.

  • Community Member Profile Picture
    on at

    Hi, Martin.

    Question:

    Table DimensionHierarchyLevel hung on trying to open both as from AOS and from SQL. On it, Opening transactions action hangs (defined by debug). Does re-index will help?

    Thanks

  • Martin Dráb Profile Picture
    237,908 Most Valuable Professional on at

    Reindex might help. I can't say for sure from this information whether your problem is caused by an index, a lock or something else.

  • Community Member Profile Picture
    on at

    Is there any command line Parameter to reindex DB from AX ?

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    No, but you could create your own. Refer to SysStartupCmd* classes.

  • Martin Dráb Profile Picture
    237,908 Most Valuable Professional on at

    Nevertheless the right approach is utilizing maintenance plans directly at the database server. It's easier and configurable, it has a scheduler and you'll be able to use a consistent approach across all databases.

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