Optimization Stages

Figure 12.1 outlines the query optimization process. Once the optimizer receives a relational operator tree into which the initial parsed query has been placed, it begins optimizing it—searching for a means of carrying out the work it requires with the least amount of cost and changing it as necessary to accomplish that. Generally speaking, each successive phase or stage of the optimization process allows more sophisticated (and often more expensive) options to be considered for transforming the initial relational operator tree presented by the parser into an optimized execution plan. If a suitably inexpensive plan is found during this process, it can be returned without requiring further optimization or evaluation of potential ...

Get Guru's Guide to SQL Server Architecture and Internals, The 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.