Is it Bigger than a Breadbox: Efficient Cardinality Estimation for Real World Workloads

Zixuan Yi, Sami Abu-el-Haija, Yawen Wang, Teja Vemparala, Yannis Chronis +6 more
10/3/2025
cs.DBcs.LG

No confident code implementation found for this paper.

Abstract

DB engines produce efficient query execution plans by relying on cost models. Practical implementations estimate cardinality of queries using heuristics, with magic numbers tuned to improve average performance on benchmarks. Empirically, estimation error significantly grows with query complexity. Alternatively, learning-based estimators offer improved accuracy, but add operational complexity preventing their adoption in-practice. Recognizing that query workloads contain highly repetitive subquery patterns, we learn many simple regressors online, each localized to a pattern. The regressor corresponding to a pattern can be randomly-accessed using hash of graph structure of the subquery. Our method has negligible overhead and competes with SoTA learning-based approaches on error metrics. Further, amending PostgreSQL with our method achieves notable accuracy and runtime improvements over traditional methods and drastically reduces operational costs compared to other learned cardinality estimators, thereby offering the most practical and efficient solution on the Pareto frontier. Concretely, simulating JOB-lite workload on IMDb speeds-up execution by 7.5 minutes (>30%) while incurring only 37 seconds overhead for online learning.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yi2025bigger,
  title  = {Is it Bigger than a Breadbox: Efficient Cardinality Estimation for Real World Workloads},
  author = {Zixuan Yi and Sami Abu-el-Haija and Yawen Wang and Teja Vemparala and Yannis Chronis and Yu Gan and Michael Burrows and Carsten Binnig and Bryan Perozzi and Ryan Marcus and Fatma Ozcan},
  year   = {2025},
  eprint = {2510.03386},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.03386v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.03386.svg)](https://codeofpaper.com/paper/2510.03386)

Discussion