Dynamics NAV index management with SQL Server 2005

After lots of talks in the past, I'm here again to talk about SQL Server index management on a Microsoft Dynamics NAV environment.

To have a well configured database that can respond quickly to your queries, it's not only necessary to have all the indexes well structured and the SQL statistics always updated, but it's important also to have the right number of indexes.

If you have a table with a large number of indexes (and this is typical on some Navision's tables if the developer is not careful on using them), you can notice that data modification performance can degradate over time (remember that indexes are updated on every operation on the database). One of the operation that it's important to do to improve performances is to identify what are the indexes that are less used on queries and disable (or drop) them.

SQL Server 2005 helps us a lot to complete this operation with the sys.dm_db_index_usage_stats function. This new function returns counts of different types of index operations and the time each type of operation was last performed and every individual seek, scan, lookup, or update on the specified index by one query execution is counted as a use of that index and increments the corresponding counter in this view.

With this function you can retrieve lots of useful informations that can help you to tune-up your index configuration. For example, by checking the time indicators (last_user_* and last_system_*) you can decide what are the less-used indexes and remove them.

Remember it... this is one of the little things that can help you to have a performant ERP system!

Print | posted on Monday, September 11, 2006 7:37 PM

Comments on this post

No comments posted yet.

Your comment:

 (will show your gravatar)
 
Please add 7 and 1 and type the answer here: