sys.dm_db_index_physical_stats - avg_page_space_used_in_percent

  • Hi All

    I'm using the sys.dm_db_index_physical_stats DMV to track Index fragmentation

    Why woulf the avg_page_space_used_in_percent column appear as NULL?

    This is the code I'm using:

    SELECT SO.name,

    SI.name IndexName

    ,SI.type_desc IndexType

    ,IPS.Avg_Fragmentation_In_Percent

    , IPS.index_level

    ,IPS.avg_page_space_used_in_percent

    FROM sys.indexes SI

    INNER JOIN sys.objects SO

    ON SO.object_id = SI.object_id

    INNER JOIN sys.dm_db_index_physical_stats (DB_ID('dbname'), object_id('tablename'), NULL , NULL, N'LIMITED')IPS

    ON IPS.OBJECT_ID = SI.object_id

    AND IPS.index_id = SI.index_id

    where SI.name is not null

    Thanks

  • BOL:

    NULL when mode = LIMITED.

  • Suresh B. (7/18/2012)


    BOL:

    NULL when mode = LIMITED.

    Thanks

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply