Cloud database vendors invest substantial resources into their query optimizers, and for good reason. Cardinality estimation, a cornerstone of the optimizer, is critical for the selection of efficient query plans, as well as downstream tasks such as resource allocation and query scheduling. Yet, as many practitioners and researchers have noted, it is also the optimizer's Achilles heel. Prior studies on a number of industrial-strength databases show substantial cardinality estimation errors on all tested systems, with a far greater tendency to underestimate than to overestimate. Unfortunately, cardinality underestimation is more problematic than overestimation, as it misleads the optimizer to choose plans designed for small data, leading to underprovisioned CPU and memory. While previous work on pessimistic cardinality estimation has proposed provable join size upper bounds, such methods can only correct overestimation, leaving the more harmful problem of underestimation unaddressed. To fill this critical gap, we introduce xBound, the very first framework for deriving provable join size lower bounds. xBound successfully reduces underestimation in real systems: On the JOBlight benchmark, it corrects 17.5% of subexpression underestimates in DuckDB and 8.7% in PostgreSQL, while on a Microsoft enterprise workload, it fixes 36.1% of Fabric Data Warehouse's underestimates, demonstrating a significant step towards solving this long-standing problem.


翻译:云数据库供应商在查询优化器上投入大量资源,这有其充分理由。基数估计作为优化器的基石,对于高效查询计划的选择以及资源分配和查询调度等下游任务至关重要。然而,正如许多从业者和研究人员所指出的,它也是优化器的致命弱点。先前对多个工业级数据库的研究表明,所有被测系统都存在显著的基数估计误差,且低估倾向远高于高估。不幸的是,基数低估比高估问题更为严重,因为它会误导优化器选择为小数据设计的计划,导致CPU和内存配置不足。尽管先前关于悲观基数估计的研究提出了可证明的连接大小上界,但此类方法仅能纠正高估问题,而未解决危害更大的低估问题。为填补这一关键空白,我们提出了xBound——首个用于推导可证明连接大小下界的框架。xBound在实际系统中成功减少了低估现象:在JOBlight基准测试中,它纠正了DuckDB中17.5%的子表达式低估和PostgreSQL中8.7%的低估;在微软企业工作负载测试中,它修正了Fabric数据仓库36.1%的低估案例,标志着在解决这一长期难题上迈出了重要一步。

0
下载
关闭预览

相关内容

深度学习组合优化,30页ppt,阿姆斯特丹Wouter Kool讲授
专知会员服务
27+阅读 · 2021年2月27日
【知乎】超越Lexical:用于文本搜索引擎的语义检索框架
专知会员服务
22+阅读 · 2020年8月28日
使用 Canal 实现数据异构
性能与架构
20+阅读 · 2019年3月4日
xgboost特征选择
数据挖掘入门与实战
39+阅读 · 2017年10月5日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
VIP会员
相关VIP内容
深度学习组合优化,30页ppt,阿姆斯特丹Wouter Kool讲授
专知会员服务
27+阅读 · 2021年2月27日
【知乎】超越Lexical:用于文本搜索引擎的语义检索框架
专知会员服务
22+阅读 · 2020年8月28日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员