what is index fragmentation in MS Sql Server
Ask by Amit Singh
Updated 17 Sep 2020
If 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 )