The plan cache

Understanding that the plan cache in SQL Server isn’t actually a separate area of memory is important. Releases prior to SQL Server 7 had two effective configuration values to control the size of the plan cache, which was then called the procedure cache. One value specified a fixed size for the total usable memory in SQL Server; the other specified a percentage of that memory (after fixed needs were satisfied) to be used exclusively for storing procedure plans. Also, in releases prior to SQL Server 7, query plans for ad hoc SQL statements were never stored in cache; only the plans for stored procedures are stored in the cache (the reason it was called procedure cache in older versions). As of SQL Server 7, the total size of memory ...

Get Microsoft SQL Server 2012 Internals 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.