Attached at the end of this post is a set of NAV objects that collects index usage information, and displays it in a NAV client so that you can sort tables by no. of Indexes / Index Reads / (Index) Block wait time, etc.:
The tool is using these three SQL Queries / DMVs:
- sys.indexes: Basic information about indexes
- sys.dm_db_index_usage_stats: No. of Index Reads, updates, etc
- sys.dm_db_index_operational_stats: Index blocking / wait time etc.
The information that is collected is already described in these posts:
So the new thing is that now the information is read into NAV, making it more easy to browse through it, get an overview, and having information from various queries collected in one place.
- The tool, relying on Dynamic Management Views (DMVs) will only work for SQL2005 and later (not SQL2000).
- The information that is collected is since last time SQL Server was restarted.
The tool contains the following objects:
|Form||74101||IUIT Index List|
|Form||74102||IUIT Table List|
And it assumes that you have a partner's developers license.
To run it:
Run form 74102 "IUIT Table List". First set up the SQL connection by clicking Table -> Setup, and specify SQL Server Name, Database Name and credentials.
Then go back to the "IUIT Table List"-form, and click Functions -> Update.
After the tool has collected the information (takes a few minutes), you can sort your tables by a number of factors which can all affect performance. And you can look at indexes for each table (Table -> Indexes (Ctrl+F5)), and get statistics for each individual index.
These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.
Lars Lohndorf-Larsen ( Lohndorf)
Microsoft Dynamics UK
Microsoft Customer Service and Support (CSS) EMEA