Skip to content

Optimizer

andyfeng edited this page May 6, 2021 · 1 revision

Cost model

For each plan we keep the following information

  • a set of flat query nodes
  • a set of unflat query nodes
  • one cardinality for all flat query nodes
  • one extension rate for each unflat query nodes

We consider the cost of following operator

  • EXTEND cost = cardinality of bound node
  • FLATTEN cost = cardinality of flatten node

For FILTER, unless it a equal comparsion on primary key, we assume nothing gets filtered by default.

Clone this wiki locally