PRICE: A Pretrained Model for Cross-Database Cardinality Estimation
Tianjing Zeng, Junwei Lan, Jiahong Ma, Wenqing Wei, Rong Zhu, Pengfei Li, Bolin Ding, Defu Lian, Zhewei Wei, Jingren Zhou

TL;DR
PRICE is a pretrained, transferable model for cross-database cardinality estimation that achieves high accuracy with low preparation cost and can be fine-tuned for specific databases, improving query optimization.
Contribution
The paper introduces PRICE, a pretrained, self-attention-based cardinality estimation model that is transferable across databases and requires minimal additional training.
Findings
PRICE outperforms existing methods in accuracy on unseen databases.
Pretraining takes about 5 hours on 30 datasets with a 40MB model.
Fine-tuning further improves estimation accuracy close to optimal plans.
Abstract
Cardinality estimation (CardEst) is essential for optimizing query execution plans. Recent ML-based CardEst methods achieve high accuracy but face deployment challenges due to high preparation costs and lack of transferability across databases. In this paper, we propose PRICE, a PRetrained multI-table CardEst model, which addresses these limitations. PRICE takes low-level but transferable features w.r.t. data distributions and query information and elegantly applies self-attention models to learn meta-knowledge to compute cardinality in any database. It is generally applicable to any unseen new database to attain high estimation accuracy, while its preparation cost is as little as the basic one-dimensional histogram-based CardEst methods. Moreover, PRICE can be finetuned to further enhance its performance on any specific database. We pretrained PRICE using 30 diverse datasets,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsData Management and Algorithms · Advanced Database Systems and Queries
