[prev] 57 [next]

PostgreSQL Query Evaluation (cont)

Each executable query is represented by a PlannedStmt node
  • defined in src/include/nodes/plannodes.h
  • contains information for execution of query, e.g.
    • which relations are involved, output tuple struecture, etc.
  • most important component is a tree of Plan nodes
Each Plan node represents one relational operation
  • types: SeqScan, IndexScan, HashJoin, Sort, ...
  • each Plan node also contains cost estimates for operation