How we built a cost-based SQL optimizer

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • JetBrains - Developer Ecosystem Survey 2022
  • cockroach

    CockroachDB - the open source, cloud-native distributed SQL database.

    CRDB implements the algorithm described in a 2013 paper called "On the correct and complete enumeration of the core search space". It is a bottom-up DP approach that is able to handle inner, left, anti, semi, full, etc. joins (many papers only cover inner joins). In addition, CRDB extends it in a few ways that enable reorderings in some important practical cases that the paper doesn't cover (a full description can be found here). As a result, it's able to reorder in a number of cases that other optimizers don't even consider.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts