Plan Cache Size Discrepancy

  • Hi All

    Why do the following 2 queries yield different results?

    --1

    SELECT

    sum(cast(size_in_bytes as decimal(18,2)))/1024/1024 AS [Total MBs]

    FROM sys.dm_exec_cached_plans

    --2

    SELECT

    SUM(single_pages_kb)/1024+ SUM(multi_pages_kb)/1024 [Total MBs]

    FROM sys.dm_os_memory_clerks

    where type in ('CACHESTORE_SQLCP','CACHESTORE_OBJCP','CACHESTORE_PHDR')

    I am trying to determine whether or not my Plan Cache is under pressure.

    Thanks

Viewing 0 posts

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