Tag: Indexes

  • DBA Scripts: Index Maintenance

    ,

    Part of the DBA-Tools Project. Index problems rarely announce themselves. A missing index shows up as a slow query someone eventually complains about; a duplicate or unused one just sits there costing write overhead and storage with nothing to show for it; fragmentation quietly degrades range scans until someone happens to check. Seven scripts on…

  • DBA Scripts: Get Index Design Issues

    Part of the DBA-Tools Project. Most index problems aren’t about a single bad index, they’re about a table’s index design as a whole drifting out of shape over time. A table that accumulates 25 indexes because nobody ever removed the old ones. A composite key that grew column by column until it’s wider than SQL…

  • DBA Scripts: Get Duplicate Indexes

    Part of the DBA-Tools Project. Indexes accumulate the same way clutter does: one developer adds an index to fix a slow query, a colleague adds a near-identical one three months later because the first one wasn’t obvious from the name, and nobody ever goes back to check whether both are pulling their weight. Two indexes…

  • DBA Scripts: Get Unused Indexes

    Part of the DBA-Tools Project. Every non-clustered index has to be maintained by SQL Server on every INSERT, UPDATE, and DELETE against the table. A table with 12 non-clustered indexes means 12 index updates for every row changed. Some of those indexes earn their keep by serving real queries. Others haven’t been read by a…

  • DBA Scripts: Get Index Usage Stats

    Part of the DBA-Tools Project. The Raw Usage Data Behind Every Index Decision Unused Indexes already filters straight to drop candidates in one database. This script is the raw data underneath that filter, and more: every index across every user database, its seeks, scans, lookups, and updates, classified into a usage pattern, with no filtering…