O'Reilly logo

Microsoft SQL Server 2012 Internals by Bob Beauchemin Kalen Delaney Conor Cunningham, Jonathan Kehayias, Benjamin Nevarez, and Paul S. Randal

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

Optimizer architecture

The Query Optimizer contains many optimization phases that each perform different functions. The different phases help the Query Optimizer perform the highest-value operations earliest in the optimization process.

The major phases in the optimization of a query, as shown in Figure 11-14, are as follows:

  • Simplification

  • Trivial plan

  • Auto-stats create/update

  • Exploration/implementation (phases)

  • Convert to executable plan

A Query Optimizer pipeline.

Figure 11-14. Query Optimizer pipeline.

Before optimization

The SQL Server query processor performs several steps before the actual optimization process begins. These transformations help shape the tree into a form that’s ...

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