what is index fragmentation in MS Sql Server
2838
09-Nov-2010
Updated on 17-Sep-2020
Anurag Sharma
10-Nov-2010Amit Singh
09-Nov-2010If you want to see the fragmentation level of an index, you can use the system function called sys.dm_db_indephysical_stats() in the following format:
SELECT * FROM sys.dm_db_indephysical_stats(
database_id, table_id, indeid, DEFAULT, DEFAULT )