Guest User

Untitled

a guest
Jan 15th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.27 KB | None | 0 0
  1. SELECT
  2.     objtype AS 'Cached Object Type',
  3.     COUNT(*) AS 'Number of Plans',
  4.     SUM(CAST(size_in_bytes AS BIGINT))/1024/1024 AS 'Plan Cache Size (MB)',
  5.     AVG(usecounts) AS 'Avg Use Count'
  6. FROM sys.dm_exec_cached_plans
  7. GROUP BY objtype
  8. ORDER BY 'Plan Cache Size (MB)' DESC
Add Comment
Please, Sign In to add comment