I know this is an old question but I have a follow-up for those of us who are using AX2009
As some here said AX “owns” the database and dba’s should not be adding indexes directly on the database.
AX will drop these next time it does a synchronization.
Don’t just add indexes based on the suggestions from the SQL Servers DMVs
Never add indexes where DataAreaID is NOT the first field unless you really understand what this causes.
(Statistics will be way better for this index compared to the rest and make the SQL Server use this instead of a better one. SQL Server is right 96% of the times – it’s pretty clever)
If you need indexes: Add them in the AOT. If you need them with included_columns. Add them in the AOT and recreate them on the SQL Server afterwards with the included columns.
The synchronization won’t see this and will leave the included columns on there.
Another thing I often hear is about performance problems in general:
If you suffer from this make sure – no one is accessing the database directly but AX
If they are – make damn sure they know what a query plan is and how its read and DON’T let them make “datawarehouse-like“ queries.. Queries running is AX should run in less than 1 second.
Also make sure you have fast storage and memory enough on the SQL Server to support your business queries. If your database is 2 Tb – make sure to have at least 200 Gb RAM or more. It’s cheaper to buy more RAM than to have users sit and do nothing.
A few other things you can do to improve performance.
Go here and download the first responder kit: www.brentozar.com/.../
Once that is done run:
sp_blitzFirst @SinceStartup = 1, @outputtype = 'top10'
This will give you the main reason for your system running slow
In case it’s CX_xxxxx or SOS_Scheduler_Yield run: sp_blitzCache @SortOrder = 'cpu'
In case it’s CX_xxxxx or PAGEIOLATCH: run: sp_blitzCache @SortOrder = 'reads'
In case it’s WRITELOG run: sp_blitzCache @SortOrder = 'writes'
This will give a list of queries to fix.
Want to find the queries the users are complaining the most about when “AX is slow”
Try sp_blitzCache @SortOrder = 'avg duration'
Just my 2 cents.
I still believe AX 2009 is the best ERP system out there.
AX 2012 became overly complicated in both business logic but also on the technical side. Having the code in the database is also pretty weird. Who came up with that? – 365 is waaay too expensive