Skip to content

Cost-based optimizer with table statistics #29

Description

@renecannao

Current optimizer is rule-based (4 rules: predicate pushdown, projection pruning, constant folding, limit pushdown).

Cost-based optimization needs:

  • Table statistics (row count, distinct values per column, histograms)
  • Cost model (estimate I/O, CPU, network for each operator)
  • Plan enumeration (compare alternative plans)
  • Join reordering
  • Hash join vs nested-loop selection

Spec: docs/superpowers/specs/2026-04-04-optimizer-design.md (architected for this extension)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions