Databases Reference
In-Depth Information
Summary
This chapter showed the internals of the Query Optimizer, how your query goes from
a SQL statement submitted to SQL Server, all the way to the selected execution plan,
including parsing, binding, simplification, trivial plan, and the full optimization stages.
Important components which are part of the Query Optimizer architecture, such as
transformation rules and the memo structure, were also introduced.
The Query Optimizer generates a solution space and selects the best possible execu-
tion plan from it, based on the plan cost. Transformation rules are used to generate
these alternatives, which are stored in a memory structure called the memo. Instead
of exploring the search space exhaustively, heuristics are also introduced to limit the
number of possible solutions. Finally, the alternatives stored in the memo are costed,
and the best solution is returned for execution.
Search WWH ::




Custom Search