arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.03152cs.DB
收藏

面向代价的智能查询执行优化

Cost-Aware Optimization for Agentic Query Execution

The University of Texas at Austin(德克萨斯大学奥斯汀分校);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Rice University(莱斯大学)

Lunyiu Nie, Yilin Xia, Yiren Liu, Christopher Jermaine, Swarat Chaudhuri

AI总结:

针对LLM支持的查询执行中算子放置、顺序和粒度影响代价与质量的问题,提出EnumGRPO优化器,通过上下文强化学习从枚举计划中蒸馏启发式策略,在SWAN数据库上实现0.011美元/查询的LLM代价和35.4%的执行准确率。

摘要:

经典查询优化搜索仅在代价上不同的代数等价计划。一旦LLM支持的算子进入画面,这一假设就被打破:它们的位置、顺序和粒度共同决定美元代价和答案质量,而备选方案中的正确选择通常只在运行时才显现。我们将此形式化为智能查询执行,这是一种将基于智能体的规划与执行交错进行的查询执行范式,智能体工作流优化成为经典查询优化的类比。然后,我们提出了EnumGRPO,一种针对此设置的自改进优化器。在学习阶段,EnumGRPO枚举关于执行范式、算子类型、算子放置、选择性范围和投影宽度等决策的查询计划,然后通过上下文强化学习将质量-代价反馈蒸馏为可重用的规划启发式策略。在SWAN的四个数据库中,EnumGRPO在LLM算子代价为0.011美元/查询时实现了35.4%的执行准确率,与混合查询基线相比,代价降低了约317倍,答案准确率相对提高了18%。

英文摘要:

Classical query optimization searches over algebraically equivalent plans that differ only in cost. This assumption breaks once LLM-backed operators enter the picture: their placement, ordering, and granularity jointly determine both cost and answer quality, and the right choice among the alternatives is often revealed only at runtime. We formalize this setting as agentic query execution, a query execution paradigm in which agent-based planning is interleaved with execution, and agent workflow optimization becomes the analogue of classical query optimization. We then present EnumGRPO, a self-improving optimizer for this setting. During a learning stage, EnumGRPO enumerates query plans over decisions such as execution paradigm, operator type, operator placement, selectivity scope, and projection width, then distills quality-cost feedback into reusable planning heuristics via in-context reinforcement learning. On SWAN, EnumGRPO achieves higher execution accuracy than LOTUS, Palimpzest, and Agentic BlendSQL, while cutting LLM-operator cost by up to 317x. Without retraining, the learned experiences transfer to another LLM family, the SemBench workload, and purely relational Spider and BIRD workloads, improving or preserving quality while reducing LLM-operator use.

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

↑