日期:2014-05-17 浏览次数:20639 次
SELECT top 10 object_name(a.object_id) [TableName] ,a.index_id ,name [IndexName] ,avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats ( DB_ID() , NULL , NULL, NULL, NULL ) AS a JOIN sys.indexes AS b ON a.object_id = b.object_id AND a.index_id = b.index_id where object_name(a.object_id)='sd_pos_salemaster' order by avg_fragmentation_in_percent desc