PRICE: A Pretrained Model for Cross-Database Cardinality Estimation

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 and adaptively 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, completing the process in about 5 hours with a resulting model size of only about 40MB. Evaluations show that PRICE consistently outperforms existing methods, achieving the highest estimation accuracy on several unseen databases and generating faster execution plans with lower overhead. After finetuning with a small volume of database-specific queries, PRICE could even find plans that were very close to the optimal ones. Meanwhile, PRICE is generally applicable to different settings such as data updates, data scaling, and query workload shifts.

Authors

Institutions

Publication Details

Journal
Proceedings of the VLDB Endowment
Published
2024-11-01
DOI
https://doi.org/10.14778/3712221.3712231
Citations
9
Primary Topic
Data Management and Algorithms
Type
article
Field-Weighted Citation Impact
3.15
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

PRICE: A Pretrained Model for Cross-Database Cardinality Estimation

Rong Zhu, Yingli Zhou, Tianjing Zeng, Bolin Ding et al.
9 citations
Proceedings of the VLDB Endowment
Data Management and Algorithms
3.15
article

PRICE: A Pretrained Model for Cross-Database Cardinality Estimation

Rong Zhu, Yingli Zhou, Tianjing Zeng, Bolin Ding, Zhewei Wei, Defu Lian, Pengfei Li, Jiahong Ma, Jingren Zhou, Wenqing Wei, Junwei Lan
article en
9 citations

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 and adaptively 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, completing the process in about 5 hours with a resulting model size of only about 40MB. Evaluations show that PRICE consistently outperforms existing methods, achieving the highest estimation accuracy on several unseen databases and generating faster execution plans with lower overhead. After finetuning with a small volume of database-specific queries, PRICE could even find plans that were very close to the optimal ones. Meanwhile, PRICE is generally applicable to different settings such as data updates, data scaling, and query workload shifts.

Proceedings of the VLDB EndowmentVol. 18(3)
Radford University College (GH), Alibaba Group (United States) (US), University of Hong Kong (HK), University of Science and Technology Chittagong (BD)
Openalex Percentile: Top 7%
Data Management and Algorithms
3.15
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.