O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recompiling Query Plans

Certain changes in a database over time can cause existing execution plans to become either inefficient or invalid, based on the new state of the database. SQL Server detects the changes that invalidate an execution plan and marks the plan as not valid. A new plan is then automatically recompiled the next time the query that uses that query plan is invoked. Most query plan recompilations are required either for statement correctness or to obtain potentially faster query execution plans. The types of conditions that can invalidate a query plan include the following:

Image Modifications made to the definition of a table or view ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required