I am using SQL Server 2008. I have tables on which there are duplicate indexes (basically indexes with same definition). I wanted to know if its possible to find out which queries are using these indexes? I don’t know why the duplicate indexes were created in the first place. So before removing them, I want to identify any queries which are using them.
One more question is in above cases, how does SQL Server engine determine which index to use? What’s the performance impact of this?
Thanks
aski
If you have indexes in your database that are exact duplicates, delete them, period. No harm can come from removing the duplicates, but harm CAN come from the duplicates existing.
The fact that SQL Server even allows duplicate indexes to be created in the first place is ridiculous.
Here is an article on how to find unused (and missing) indexes:
http://weblogs.sqlteam.com/mladenp/archive/2009/04/08/SQL-Server—Find-missing-and-unused-indexes.aspx