November 3, 2008 at 3:08 pm
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
November 3, 2008 at 4:46 pm
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
November 3, 2008 at 5:31 pm
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