Collecting Index Usage Statistics

Knowing when and how often your indexes are used can really come in handy. Indexes that are never utilized aren't worth keeping around, and knowing their usage patterns can be a big help when making decisions regarding things such as filegroup placement and compression settings. SQL Server 2005 brought some great advancements in the form of the sys.dm_db_index_usage_stats DMV, which returns statistics on index usage that are automatically being kept by the server. While it's a step forward, I feel it still leaves a few things to be desired: The values are cumulative since the server was last restarted Once…
Read More

Potty Chairs and Duplicate Indexes

This post is my contribution to T-SQL Tuesday #10, which is being hosted by Michael J. Swart (blog | twitter) Each year my Boy Scout troop has a rummage sale as a fundraiser.  All the scouts and their families gather up their old clothes, books, toys, electronics, and any other treasures they no longer need and donate them to the troop, which sells them.  It's basically a giant garage sale, except it's done in the gym of the school we meet at.  Since everything sold comes from someone associated with the troop, many years ago it was decided to create…
Read More

T-SQL Tuesday #007: My Favorite 2008 Feature

This post is my contribution to T-SQL Tuesday #007, hosted this month by the SQLChicken himself, Jorge Segarra (Blog | Twitter). Since I'm a bad DBA and have yet to get my hands on a copy of R2, I'll make use of the rule that we can discuss any feature from 2008.  My favorite is filtered indexes, as they were the solution to an issue I had been trying to fix for 5 years. The Background In a former life, I spent several years working as a building inspector for one of Chicago's western suburbs.  It quickly became evident that…
Read More