/ Published in: SQL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT objtype AS �Cached Object TYPE�, COUNT(*) AS �NUMBER OF plans�, SUM(CAST(size_in_bytes AS BIGINT))/1024/1024 AS �Plan Cache SIZE (MB)�, avg(usecounts) AS �Avg USE COUNT� FROM sys.dm_exec_cached_plans GROUP BY objtype