arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.01229cs.DB
收藏

学习型成本模型究竟有多好?来自查询优化任务的洞察

How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks

Roman Heinrich, Manisha Luthra, Johannes Wehrstein, Harald Kornmayer, Carsten Binnig

AI总结:

本文系统评估了七种学习型成本模型在连接顺序、访问路径和物理算子选择三个查询优化核心任务上的表现,发现传统成本模型往往仍优于学习型模型,并为未来改进学习型成本模型提供了建议。

摘要:

传统上,查询优化器依赖成本模型从多个候选计划中选择最佳执行计划,因此精确的成本估计对于高效查询执行至关重要。近年来,基于机器学习的成本模型被提出,以克服传统成本模型的不足。尽管这些模型已被证明能提供更好的预测精度,但关于学习型成本模型(Learned Cost Models, LCMs)在查询优化中的实际表现以及它们如何影响整体查询性能的研究仍然有限。本文通过一项系统性研究来弥补这一不足,在三个核心查询优化任务上评估LCMs:连接顺序选择、访问路径选择和物理算子选择。在我们的研究中,我们将七种最先进的LCMs与传统成本模型进行比较,结果令人意外地发现,传统模型在这些任务中往往仍然优于LCMs。最后,我们总结了主要发现和建议,以指导未来研究使LCMs在查询优化中更加有效。

英文摘要:

Traditionally, query optimizers rely on cost models to choose the best execution plan from several candidates, making precise cost estimates critical for efficient query execution. In recent years, cost models based on machine learning have been proposed to overcome the weaknesses of traditional cost models. While these models have been shown to provide better prediction accuracy, only limited efforts have been made to investigate how well Learned Cost Models (LCMs) actually perform in query optimization and how they affect overall query performance. In this paper, we address this by a systematic study evaluating LCMs on three of the core query optimization tasks: join ordering, access path selection, and physical operator selection. In our study, we compare seven state-of-the-art LCMs to a traditional cost model and, surprisingly, find that the traditional model often still outperforms LCMs in these tasks. We conclude by highlighting major takeaways and recommendations to guide future research toward making LCMs more effective for query optimization.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑