Sql-server – Using DTA vs. evaluating DMVs

database-tuning-advisorindex-tuningperformancesql serversql-server-2008

Currently I am confronted with a production SQL Server database where someone had added almost all missing index proposals from DTA.

Form How to determine if an Index is required or necessary I have learned, that there are DMV views, which can be used to defer information about actual index usage as well as missing indexes.

The script from Jason Strate only uses the current information from that views, while Fun for the day – Automated Auto-Indexing! saves some information from those views into tables.

DTA on the other side requires planning when to run the profiler, select what to profile and has some impact on performance while running.

My impression is that using DTA as first step tuning tool is simply a waste of time and as its results don't cover the complete database usage, are hard to interpret by novices and can lead to adding too much indexes with negative impact on write performance, while Data collection via DMV requires little preparation and covers nearly the whole usage of the database since the last restart.

My question focuses on which strategy to propose to the management.
I want to focus on evaluation the DMV views in the first step and ignore DTA completely.

Best Answer

I think it's smarter to build something that monitors the DMVs and tracks their data over time (maybe taking a snapshot of the index usage and missing index DMVs every night - might make sense to include procedure stats as well) than to run some tool for a short period whenever you think to do so. You'll get a much better picture over a longer period not only what they are right now but also how they've changed over time.

Be careful not to drop indexes that seem unused but may be hooked to some report that only gets called once or twice in a business cycle - it could be more important than its frequency might suggest.