Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 590774f

Browse files
authored
Create README.md
1 parent 6c65689 commit 590774f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/optimizer/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Optimizer Overview
2+
3+
The optimizer follows the cascade framework, it takes an annotated parse tree as input, goes through multiple optimization phases, and output an execution plan. The major phases are:
4+
5+
* Parse tree to logical operator tree transformation, which turns a parse tree into a logical operator tree.
6+
* Predicate push-down, which pushes predicates to the lowest possible operator to evaluate.
7+
* Unnesting, which turns sub-queries with corelation into regular join operator.
8+
* Logical transformation, which enumerates all possible join order.
9+
* Stats derivation, which derives stats needed to compute cost for each group.
10+
* Phyisical implementation, which enumerates all possible implementation for a logical operator, e.g. hash join v.s. nested-loop join
11+
* Property enforcing, which adds missing properties descirbing the output data's format, e.g. sort order.
12+
* Operator to plan transformation, which turns the best physical operator tree into an execution plan.
13+
14+
Predicate push-down and unnesting are rewrite phases, they will run independently.

0 commit comments

Comments
 (0)