• --A slight modification so it displays the memory used in MB as well.

    -- Top 10 consumers of memory from Buffer Pool

    SELECT TOP 10

    [type] AS OBJECT_TYPE

    , SUM(pages_kb) AS memory_in_kb

    , (SUM(pages_kb) / 1024) AS memory_in_MB

    FROM

    sys.dm_os_memory_clerks

    GROUP BY

    type

    ORDER BY

    SUM(pages_kb) DESC ;