September 2010
Intermediate to advanced
1704 pages
111h 8m
English
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 2008. Following are some of the useful ones related to monitoring the plan cache:
• sys.dm_exec_cached_plans—Returns general information about the query execution plans currently in the plan cache.
• sys.dm_exec_query_stats—Returns aggregate performance statistics for cached query plans.
• sys.dm_exec_sql_text—Returns the text of the SQL statement for a specified plan handle.
• sys.dm_exec_cached_plan_dependent_objects—Returns one row for every dependent object of a compiled plan.
• sys.dm_exec_plan_attributes—Returns one row per attribute associated with the plan for a specified plan ...