Useful SQL Scripts

We have a number of useful SQL scripts for Microsoft SQL Server which you are free to use. We ask that the Copyright information and headers are not removed.

Create missing indexes based on SQL Server missing index stats. This script allows you to generate the code to create indexes which the SQL optimizer believes will improve query performance. While not always correct these can often give significant performance improvements. We would not recommend creating more than 3-4 new indexes on a single table. Create Missing Indexes