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

PLANSIEVE:通过增量细化实现实时次优查询计划检测

PLANSIEVE: Real-time Suboptimal Query Plan Detection Through Incremental Refinements

Asoke Datta, Yesdaulet Izenov, Brian Tsan, Abylay Amanbayev, Florin Rusu

AI总结:

PLANSIEVE是一种在查询优化期间通过增量细化代理基数并分析子计划相对顺序来实时检测次优查询计划的新框架,在预测次优计划时准确率达88.7%。

摘要:

基数估计仍是查询优化中的基本挑战,常导致次优执行计划和性能下降。尽管基数估计中的错误不可避免,但现有的次优计划识别方法——如Q-error、P-error或L1-error等指标——仅限于执行后分析,需要真实基数的完整知识,无法实时阻止次优计划的执行。本文提出了PLANSIEVE,一种在查询优化期间识别次优计划的新颖框架。PLANSIEVE通过分析优化器基于估计和真实基数生成的子计划的相对顺序来运作。它从任何第三方估计器的代理基数开始,并随着系统处理更多查询而增量细化这些代理。在增强的JOB-LIGHT-SCALE和STATS-CEB-SCALE工作负载上的实验结果表明,PLANSIEVE在预测次优计划时达到了高达88.7%的准确率。

英文摘要:

Cardinality estimation remains a fundamental challenge in query optimization, often resulting in sub-optimal execution plans and degraded performance. While errors in cardinality estimation are inevitable, existing methods for identifying sub-optimal plans -- such as metrics like Q-error, P-error, or L1-error -- are limited to post-execution analysis, requiring complete knowledge of true cardinalities and failing to prevent the execution of sub-optimal plans in real-time. This paper introduces PLANSIEVE, a novel framework that identifies sub-optimal plans during query optimization. PLANSIEVE operates by analyzing the relative order of sub-plans generated by the optimizer based on estimated and true cardinalities. It begins with surrogate cardinalities from any third-party estimator and incrementally refines these surrogates as the system processes more queries. Experimental results on the augmented JOB-LIGHT-SCALE and STATS-CEB-SCALE workloads demonstrate that PLANSIEVE achieves an accuracy of up to 88.7\% in predicting sub-optimal plans.

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

↑