Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Missing Indexes By Index Advantage

By SQL Scripts Manager dev team,

From "SQL Server DMV Starter Pack" by Louis Davidson and Tim Ford.


When this script runs, it identifies potentially missing indexes.

This script combines three closely-related DMVs to get a very useful missing index query. It uses the various statistics stored regarding data access patterns to calculate the possible 'advantage' of adding a certain index; The higher the index_advantage, the bigger the impact.

The results are only as good as the statistics, so they may be spurious if you have recently added new indexes - which resets all the statistics for that table.

Beware that this script may not recommend the best column <i>order</i>, it does not consider filtered indexes, and is very eager to suggest new indexes.

Always examine the results of these recommendations and consider their impact before applying them; is there already an index that will suffice? Is the query that caused the recommendation rarely called? (check the last_user_seek column) What impact would adding another index have on your (potentially write heavy) table?

Total article views: 4232 | Views in the last 30 days: 24
Related Articles

Updated Overlapping Statistics Scripts

Last year I published a script for identifying automatically generated column statistics that overla...


Generated script to update statistics

Generated script to update statistics


SQL Server 6.5: Index Statistic Details

This article examines how index statistics are used in SQL Server 6.5


SQL Server 6.5: Index Statistic Details

This article examines how index statistics are used in SQL Server 6.5


HELP= Rebuild index & Update STATISTICS

HELP= Rebuild index & Update STATISTICS


Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones