TiCard: Deployable EXPLAIN-only Residual Learning for Cardinality Estimation
Qizhi Wang

TL;DR
TiCard introduces a low-intrusion, correction-based framework that enhances native database cardinality estimators using EXPLAIN-only features, significantly improving tail accuracy with minimal deployment complexity.
Contribution
TiCard presents a novel, deployable residual learning approach that augments existing estimators without invasive changes, using EXPLAIN-only features and two practical instantiations for improved accuracy.
Findings
Substantial reduction in P90 and P99 Q-errors on TiDB benchmarks.
Effective offline learning with minimal trace data.
Maintains near-perfect median behavior with join-only policies.
Abstract
Cardinality estimation is a key bottleneck for cost-based query optimization, yet deployable improvements remain difficult: classical estimators miss correlations, while learned estimators often require workload-specific training pipelines and invasive integration into the optimizer. This paper presents TiCard, a low intrusion, correction-based framework that augments (rather than replaces) a database's native estimator. TiCard learns multiplicative residual corrections using EXPLAIN-only features, and uses EXPLAIN ANALYZE only for offline labels. We study two practical instantiations: (i) a Gradient Boosting Regressor for sub-millisecond inference, and (ii) TabPFN, an in-context tabular foundation model that adapts by refreshing a small reference set without gradient retraining. On TiDB with TPCH and the Join Order Benchmark, in a low-trace setting (263 executions total; 157 used for…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Database Systems and Queries · Graph Theory and Algorithms · Data Quality and Management
