SELECT object_id, index_id, avg_fragmentation_in_percent, page_count 
FROM sys.dm_db_index_physical_stats(DB_ID('your_db_name'), OBJECT_ID('your_one_table'), NULL, NULL, NULL);
 
Reference Values (in %) Action SQL statement

avg_fragmentation_in_percent > 5 AND < 30

Reorganize Index ALTER INDEX REORGANIZE

avg_fragmentation_in_percent > 30

Rebuild Index ALTER INDEX REBUILD

 

 

相关文章:

  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2021-08-23
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
猜你喜欢
  • 2021-06-09
  • 2022-12-23
  • 2021-12-08
  • 2021-11-11
  • 2022-12-23
  • 2022-01-22
  • 2021-12-11
相关资源
相似解决方案