标签:重建索引 use table stat physical build blog fragment 技术分享
SELECT index_type_desc,alloc_unit_type_desc,avg_fragmentation_in_percent,fragment_count,avg_fragment_size_in_pages,page_count,record_count,avg_page_space_used_in_percent
FROM sys.dm_db_index_physical_stats(DB_ID(‘advanced6‘),OBJECT_ID(‘Table_2‘),NULL,NULL,‘Sampled‘)
当avg_fragmentation_in_percent 大于40%时,往往需要整理与重建索引,方法如下:
ALTER INDEX PK_Table_2 ON Table_2 REBUILD
标签:重建索引 use table stat physical build blog fragment 技术分享
原文地址:http://www.cnblogs.com/xgyweb/p/6249561.html