[prev] 17 [next]

Top-down Trace of QOpt (cont)

grouping_planner() produces plan for one SQL statement
  • preprocesses target list for INSERT/UPDATE
  • handles "planning" for extended-RA SQL constructs:
    • set operations: UNION/INTERSECT/EXCEPT
    • GROUP BY, HAVING, aggregations
    • ORDER BY, DISTINCT, LIMIT
  • invokes query_planner() for select/join trees
Code in: backend/optimizer/plan/planmain.c