Missing Indexes Table

  • Hi All - I am using the following table to produce details on missing indexes; dm_db_missing_index_details. I would like more information on the following columns, equality_columns, inequality_columns and included_columns. I would like to know what this information means and weather I should use it. Furthermore, how I should use it. Thanks.

    --------------------------------------------

    Laughing in the face of contention...

  • Yeah, you pretty much have to use it. Equality and Inequality columns are the columns being used within the queries in the WHERE, JOIN and HAVING clauses. They would make the key fields for your indexes. The Include columns are additional columns that can be stored at the leaf level of the index using the INCLUDE syntax for index creation. They help to make the index into a covering index. A covering index is an index that contains all the columns necessary to satisfy a given query.

    Please note, you can't trust the missing index information. Take them as suggestions. Do not simply apply every index suggested. Test them to ensure they help, and don't hurt, your workload.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • Thanks for the information Grant! I'm much clearer now on what needs to be done.

    --------------------------------------------

    Laughing in the face of contention...

  • You can't consider missing index info in isolation. At the very least, you also need to look at index usage stats. Both of those are the minimum needed to make reasonable index modifications (creates / alters / drops).

    SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply