Determine Index usage

  • Lets say you have a stored procedure which queries 5 tables,

    via either (inner / outer / cross / full) joins.

    1.

    After creating indexes on the 5 tables, you now want to determine which indexes are actually being used by the execution plan (to remove indexes not used by execution plan).

    Is there a way of doing this ?

    2.

    Lets say the execution plan shows each table, and the table index cost - does it actually use that table index or is it just an extimation ?

    Regards

    Kevin

    sonyt65@yahoo.com

  • Execute your stored procedure and check under sys.dm_db_index_usage_stats DMV whether the underlying indexes have been used or not.

    Also, tables and indexes dispalyed under actual execution plan are always utilised during execution of query.

    MJ

  • Double post of:

    http://www.sqlservercentral.com/Forums/Topic596167-146-1.aspx

    Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
    My Blog | Twitter | MVP Profile
    Training | Consulting | Become a SQLskills Insider
    Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]

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

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