SQLBits 2012

What's Buried in the Plan Cache?

In this session, we'll examine the query plan cache to see what plans are saved, what plans are reused, when plans are recreated, methods for observing the contents of the plan cache, and finally, methods for manipulating plan reuse and recreation.
Creating a query plan can be a time consuming and expensive process. To avoid repeating these potentially costly steps unnecessarily, SQL Server stores its query plans, in the plan cache where they can be reused as needed. In this session, we’ll look at how the plan cache is organized, what plans are saved, when plans are reused and when they are recreated, methods for observing the contents of the plan cache, and finally, methods for manipulating plan reuse and recreation.