Friday, February 13, 2009

SQL Server I/O statistics by table/index

select object_name(i.object_id) as table_name       ,i.name as index_name, s.*   from sys.dm_db_index_operational_stats(null, null, null, null) s       ,sys.indexes i  where i.object_id = s.object_id    and i.index_id  = s.index_id    and objectproperty(s.object_id,'IsUserTable') = 1  order by database_id, table_name, index_name, partition_number

No comments:

Post a Comment

 
span.fullpost {display:inline;}