AdapCard: Adaptive Cardinality Estimation via Meta-Learning and Tri-Correlation Sum-Product Networks
Licheng Gong , Quanqing Xu , Tiezheng Nie , Derong Shen , Minxuan Li , Yue Kou , Chuanhui Yang
Cardinality estimation is a cornerstone of query optimization. However, learned estimators still face a practical bottleneck. Many Sum-Product Network-based methods rely on fixed global correlation threshold(s) to construct product nodes, even though dependence patterns vary across datasets and across recursive subproblems within the same dataset. This paper proposes AdapCard, a learned cardinality estimation framework that improves robustness and efficiency by separating two design problems: how to choose splitting thresholds and how to use them for attribute partitioning. First, AdapCard introduces Meta-learning-based Automatic Threshold Prediction Model (MetaATPM), a meta-learned threshold predictor that is invoked at each recursive SPN construction node and predicts node-specific threshold(s) from the current local dependence structure. For RSPN-style construction, it outputs a scalar threshold; for TC-SPN, it outputs a threshold pair (β, α). Second, AdapCard introduces TC-SPN, a tri-correlation SPN construction scheme that uses weak, moderate, and strong dependence regimes to form product-node partitions with finer granularity than binary splitting. We further extend AdapCard to multi-table estimation through a join-graph-based decoupled local-model design. Experiments on standard single-table and multi-table benchmarks show that AdapCard achieves best or near-best accuracy while substantially reducing training and inference cost.
Query Optimization / Cardinality Estimation / Sum-Product Networks / Meta-Learning
Higher Education Press 2026
/
| 〈 |
|
〉 |