If you want to view the objects within the cache use the query below. This will give you an insight into how optimizer and storage engine reached the plan.
SELECT [qpc].[refcounts] , [qpc].[usecounts] , [qpc].[objtype] , [st].[dbid] , [stx].[objectid] , [stx].[text] , [qpl].[query_plan] FROM sys.dm_exec_cached_plans qpc CROSS APPLY sys.dm_exec_sql_text ( cp.plan_handle ) stx CROSS APPLY sys.dm_exec_query_plan ( cp.plan_handle ) qpl ; Key Column meanings: [qpc].[refcounts] = Number of cached objects referencing the object [qpc].[usecounts] = Times used since started [qpl].[query_plan] = compile-time Showplan
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |