What is Cost-based optimization (CBO)?

A optimization strategy used by the query engine to pick a query plan to execute the SQL statement based on the cost estimate. It's the strategy used by all mainstream databases. It's predecessor is Rule-based optimization (RBO). The advantage of CBO is it's more adaptive than the hard-coded RBO since it's based on the actual context, the number of estimated rows to be fetched, the cost of each fetch, the index to be used and etc. Because there are quite a few factors to consider, and it's prohibitive expensive to explore all permutations, thus the database often finds the best plan among a subset of all possible plans.

Database schema migration and version control, Database CI/CD, and DevOps for developers and DBAs

Bytebase is an open source, web-based database schema change and version control tool for teams. It offers a web-based collaboration workspace to help DBAs and Developers manage the lifecycle of application database schemas.

  • MySQL
  • PostgreSQL
  • Snowflake
  • Oracle
  • SQL Server
  • MongoDB
  • Redis
  • Redshift
  • ClickHouse
  • TiDB
  • OceanBase
  • Spanner
  • MariaDB
  • GitLab
  • GitHub
  • Bitbucket
  • Azure DevOps
  • Terraform


Subscribe to Newsletter

By subscribing, you agree with Bytebase's Terms of Service and Privacy Policy.