Monitoring the Plan Cache

You can view and get information about the query plans currently in plan cache memory by using some of the DMVs available in SQL Server 2012. Following are some of the useful ones related to monitoring the plan cache:

Image sys.dm_exec_cached_plans—Returns general information about the query execution plans currently in the plan cache.

Image sys.dm_exec_query_stats—Returns aggregate performance statistics for cached query plans.

Image

Get Microsoft® SQL Server 2012 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.