Microsoft SQL Server 2012 Internals
by Bob Beauchemin Kalen Delaney Conor Cunningham, Jonathan Kehayias, Benjamin Nevarez, and Paul S. Randal
Optimization hints and plan guides
Chapter 11 looks at many different execution plans and discusses what it means for a query to be optimized. This chapter looks at situations in which SQL Server reuses a plan when it might have been best to come up with a new one, and you’ve seen situations in which SQL Server doesn’t reuse a plan even if a perfectly good one is in cache already. One way to encourage plan reuse that has already been discussed in this chapter is to enable the PARAMETERIZATION FORCED database option. In other situations, where you just can’t get the optimizer to reuse a plan, you can use optimization hints. Optimization hints can also be used to force SQL Server to come up with a new fplan in those cases in which it might be using ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access