Showing posts with label sql server missing indexes. Show all posts
Showing posts with label sql server missing indexes. Show all posts

Tuesday, May 05, 2009

Identify missing indexes in sql server 2005

SELECT DISTINCT DB_NAME(Database_ID) [Database]
,OBJECT_NAME(Object_ID) [Table]
,Equality_Columns
,Included_Columns
FROM sys.dm_db_missing_index_details mid
WHERE Database_ID = DB_ID()
ORDER BY 2