The effectiveness of a cost-based query optimizer relies on the accuracy of selectivity estimates. The execution plan generated by the optimizer can be extremely poor in reality due to uncertainty in these estimates. This paper presents PARQO (Penalty-Aware Robust Query Optimization), a novel system where users can define powerful robustness metrics that assess the expected penalty of a plan with respect to true optimal plans under a model of uncertainty in selectivity estimates. PARQO uses workload-informed profiling to build error models, and employs principled sensitivity analysis techniques to identify selectivity dimensions with the largest impact on penalty. Experimental evaluation on three benchmarks demonstrates how PARQO is able to find robust, performant plans, and how it enables efficient and effective parametric optimization.
翻译:基于代价的查询优化器的有效性依赖于选择率估计的准确性。由于这些估计存在不确定性,优化器生成的执行计划在实际中可能表现极差。本文提出PARQO(基于惩罚感知的鲁棒查询优化),这是一个新颖的系统,用户可在其中定义强大的鲁棒性度量标准,用于评估在选择性估计不确定性模型下,某一执行计划相对于真实最优计划的预期惩罚。PARQO利用基于工作负载的分析构建误差模型,并采用基于原理的敏感性分析技术来识别对惩罚影响最大的选择率维度。在三个基准测试上的实验评估表明,PARQO能够找到鲁棒且高性能的执行计划,并实现高效有效的参数化优化。