Sql-server – Is it worth the time to review indexes suggested by index tuning advisers

index-tuningsql server

I find I am spending a lot of time lately examining lists of proposed indexes that were generated by an index tuning adviser or some other automated process.

Back in the day (circa 2005) I found the suggestions to be rather awful in that they seemed geared to one specific query and more often than not were merely a covering index that had every column in the table whether or not those colums were already indexes.

As time has progressed, I feel the index tuning advisers have improved dramatically, but I still have a built-in mistrust and still want to spend the time to review each one.

I am trying not to be pessimistic, but it is difficult when a vendor (Microsoft) suggests to add multiple overlapping covering indexes to improve performance, especially when we are paying for storage space. I also don't want to spend my own time needlessly. I would rather be fixing poorly written queries.

Best Answer

Remember it is just an advisor...just as in life they are not always right on the path that you should take. It's free advise to take or leave.

For the most part it is basing it off the DMV data in SQL Server so it can even fluctuate on what it sees as being an issue. I generally will them as a guide.

Example:

I see a common set of tables showing "suggested" indexes. Well that would tell me then maybe the current indexes, for those tables, need to be reviewed against the current load that is running. Index architecut can change over the life of an application, the indexes created when during release version 1.0 may not be the same once you reach version 5.0.

I would then maybe go use sp_BlitzIndex or Jason Strate's Index Analysis to look at the table and indexes. Maybe go through and capture the execution plans for thost tables, or pull them from cache.

Remember though, it is worth testing any index you add to a table if you can. If not and you are going through modifying indexes, then make sure you make a script of the current indexes so you can restore them.