page51
32
and algorithms. Furthermore, you can assume this step is a multipass process where
many different QBIR representations are generated and compared to derive the optimal
internal representation.
Micro-Partition Pruner
The optimal QBIR is received by the micro-partition pruner, which acts as the name
suggests by invoking the pruner to exclude micro-partitions from consideration in
resolving the eventual query result set. You can assume the optimizer statistics (as listed
in Chapter 1) inform the micro-partition pruning strategy.
Micro-partition pruning occurs during several stages of the query plan generation
and is implemented via the pruner, as explained in Chapter 3. For now, it is sufficient to
understand micro-partition pruning conceptually within this overview.
Initial Plan Generation
After first-pass pruning has occurred, an initial execution plan is generated called the
query plan (QP) internal representation, which is then passed to the plan rewriter.
We anticipate additional checks are performed during initial plan generation,
including optional steps that may be skipped.
Plan Rewriter
Within the plan rewriter, a suite of rules applied to the QP causes rewrites, which may
result in further micro-partition pruning implemented via the pruner shown separately.
You can assume additional checks are performed during plan rewrite including
optional steps that may be skipped.
Cost-Based Join Ordering
Cost-based join ordering implies a rules-based approach to finalizing the QP. In truth,
not much is known about this step; perhaps the clue is in the name, and the step simply
orders the data access paths.
You can assume additional checks are performed during cost-based join ordering
including optional steps that may be skipped.
Chapter 2
the Query Optimizer