sql server - SQL DMV Queries & Cached Plans -


I understand that some of the DMVs in SQL Server depend on the schemes being cached. My questions are: Are all query plans cached? If not, when does a query plan cache? How many people live in the cash for the cashed people?

Thank you very much

Some SQL Server DMVs that are directly for query plan cache Capture related tokens, the memory placed on query plan cache (Adihoke queries, other memory usage and high activity or other means) is at the mercy of pressure. The query scheme is subject to the aging of the cash scheme (for example, a plan costing 10, which is referred to 5 times, 50 is the "age" value of 50):

If the following criteria are met, Then the plan is removed from memory:

· System needs more memory

· The "age of the plan" has reached zero

· It The plan 'is currently being referred by an existing connection.

Those DMVs are not directly related to the query plan cache, under the 'normal' memory pressure (cache data page) or if the SQL Server service is restarted

query plan caching The factors affecting have changed slightly since SQL Server 2000. Here is an up-to-date reference for SQL Server 2008:


Comments