Reqo:一种全面的学习型成本模型用于鲁棒且可解释的查询优化
Reqo: A Comprehensive Learning-Based Cost Model for Robust and Explainable Query Optimization
AI总结:
Reqo提出了一种鲁棒且可解释的查询优化成本模型,通过增强计划生成、表示和选择三个阶段,提升查询优化的性能和可解释性。
摘要:
尽管机器学习(ML)在通过生成和选择更高效的计划来提高查询优化方面显示出潜力,但确保基于学习的成本模型(LCMs)的鲁棒性仍然具有挑战性。这些LCMs目前缺乏可解释性,这削弱了用户信任,并限制了从其成本预测中获得洞察力以提高计划质量的能力。准确地将树结构的查询计划转换为表示形式也是至关重要的,因为遗漏任何细节都可能对后续的成本模型性能产生负面影响。此外,成本估计中的固有不确定性导致预测不准确,从而导致计划选择不优。为了解决这些挑战,我们引入了Reqo,一种鲁棒且可解释的查询优化成本模型,该模型全面增强了查询优化的三个主要阶段:计划生成、计划表示和计划选择。Reqo集成了三个创新:第一种用于LCMs的可解释性技术,量化子图贡献并生成计划生成提示以提高候选计划质量;一种基于双向图神经网络(Bi-GNNs)的新型树模型,配备门控循环单元(GRU)聚合器,以进一步捕捉节点级和结构信息,并有效加强计划表示;以及一种不确定性感知的学习到排序成本估计器,能够自适应地整合成本估计与不确定性以增强计划选择的鲁棒性。广泛的实验表明,Reqo在所有三个阶段上都优于最先进的方法。
英文摘要:
Although machine learning (ML) shows potential in improving query optimization by generating and selecting more efficient plans, ensuring the robustness of learning-based cost models (LCMs) remains challenging. These LCMs currently lack explainability, which undermines user trust and limits the ability to derive insights from their cost predictions to improve plan quality. Accurately converting tree-structured query plans into representations via tree models is also essential, as omitting any details may negatively impact subsequent cost model performance. Additionally, inherent uncertainty in cost estimation leads to inaccurate predictions, resulting in suboptimal plan selection. To address these challenges, we introduce Reqo, a Robust and Explainable Query Optimization cost model that comprehensively enhances three main stages in query optimization: plan generation, plan representation, and plan selection. Reqo integrates three innovations: the first explainability technique for LCMs that quantifies subgraph contributions and produces plan generation hints to enhance candidate plan quality; a novel tree model based on Bidirectional Graph Neural Networks (Bi-GNNs) with a Gated Recurrent Unit (GRU) aggregator to further capture both node-level and structural information and effectively strengthen plan representation; and an uncertainty-aware learning-to-rank cost estimator that adaptively integrates cost estimates with uncertainties to enhance plan selection robustness. Extensive experiments demonstrate that Reqo outperforms state-of-the-art approaches across all three stages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。