Precision Meets Resilience: Cross-Database Generalization with Uncertainty Quantification for Robust Cost Estimation
Learning-based models have shown promise in addressing query optimization challenges in the database field, where the learned cost model plays a central role. While these models outperform traditional optimizers on static datasets, their resilience and reliability in real-world applications remain a concern, limiting their widespread adoption. In this paper, we take a step towards a practical cost estimation model, named Tosure, which can quantify the uncer<u>T</u> ainty for c<u>o</u>st estimation and generalizes to un<u>s</u>een databases acc<u>ur</u>ately and <u>e</u>fficiently. It consists primarily of two modules: a Cross-Database Representation (CDR) module and a Cost Estimation with Uncertainty (CEU) module. The CDR module captures the transferable features by focusing the minimal set based on deep-learning network, thereby enhancing the model's generalization capabilities. The CEU module introduces a novel Neural Network Gaussian Process (NNGP) to quantify the uncertainty in cost estimation, ensuring more robust estimations with an upper bound. To improve the model's performance, we perform pre-training on diverse large-scale datasets. Furthermore, we implement the model and integrate it with traditional query optimizer to validate its usability and effectiveness in real-world scenarios. Extensive experimentation demonstrates that Tosure outperforms state-of-the-art methods, achieving a 20% improvement in cost estimation accuracy and twice of the robustness.
Authors
- Wenwen Ma
- Shuhuan Fan (ORCID: https://orcid.org/0009-0003-9191-1968)
- Mengshu Hou (ORCID: https://orcid.org/0000-0002-5283-7318)
- Rui Xi (ORCID: https://orcid.org/0000-0002-6400-9106)
Institutions
- University of Electronic Science and Technology of China (CN)
Publication Details
- Published
- 2024-10-20
- DOI
- https://doi.org/10.1145/3627673.3679632
- Primary Topic
- Advanced Statistical Process Monitoring
- Type
- article
- Field-Weighted Citation Impact
- 0.00