Top-down Trace of QOpt (cont)
query_planner() produces plan for a select/join tree
- make list of tables used in query
- split where qualifiers ("quals") into
- restrictions (e.g.
r.a=1 ) ... for selections
- joins (e.g.
s.id=r.s ) ... for joins
- search for quals to enable merge/hash joins
invoke make_one_rel() to find best path/plan
Code in: backend/optimizer/plan/planmain.c
|