Home Forums SQL Server 2008 SQL Server 2008 - General 'sys.dm_db_index_physical_stats' giving 3 rows with different fragmentation. RE: 'sys.dm_db_index_physical_stats' giving 3 rows with different fragmentation.

  • Tac11 (2/1/2015)


    Thanks for you reply. But i didn't catch you. All three outputs have same table name, same index name and index type, but different fragment level and different page count!!!

    That index on that table has three levels to the index. When you run sys.dm_db_index_physical_stats at a detail level you will get the fragmentation level of an index at all levels of the index.

    From books online regarding the table returned:

    index_level tinyint Current level of the index.

    0 for index leaf levels, heaps, and LOB_DATA or ROW_OVERFLOW_DATA allocation units.

    Greater than 0 for nonleaf index levels. index_level will be the highest at the root level of an index.

    The nonleaf levels of indexes are only processed when mode = DETAILED.