Return to Snippet

Revision: 26051
at April 17, 2010 08:58 by tvanzele


Initial Code
SELECT OBJECT_NAME(s.[object_id]) AS [ObjectName], i.name AS [IndexName], i.index_id,user_seeks + user_scans + user_lookups AS [Reads], user_updates AS [Writes],i.type_desc AS [IndexType], i.fill_factor AS [FillFactor]
FROM sys.dm_db_index_usage_stats AS s
INNER JOIN sys.indexes AS i
ON s.[object_id] = i.[object_id]
WHERE OBJECTPROPERTY(s.[object_id],'IsUserTable') = 1
AND i.index_id = s.index_id
AND s.database_id = DB_ID()
ORDER BY OBJECT_NAME(s.[object_id]), writes DESC, reads DESC;

Initial URL

                                

Initial Description

                                

Initial Title
Index Read/Write/Fill Factor stats (current DB)

Initial Tags
sql

Initial Language
SQL