Procedure for Index usage

I wrote a small stored procedure to shortcut querying Index usage in SQL Server. Check out the stored procedure body below. As you may be able to see, you just need to provide the table name you wish to filter by. You can optionally chose…

Get the size of indexes for a given table

It’s important to be aware of how large the indexes are on your tables. If the sum index size is larger than the total table size, you may want to consider revising the design. The following script will provide the disk size of all indexes…

Bulk disable indexes

If you’re performing a large data migration task, or running a script that will insert many records, you may be able to speed up the process by disabling indexes on you database. This will help, because the database won’t need to incrementally update the indexes…

View index details by Table

Here’s a handy script to see the indexes available on a given table. The script displays all columns associated with the index, and identifies if it is a index key column, or an include. Hopefully you will find it helpful with database tuning, as I…