论文标题

Balsa:学习无专家演示的查询优化器

Balsa: Learning a Query Optimizer Without Expert Demonstrations

论文作者

Yang, Zongheng, Chiang, Wei-Lin, Luan, Sifei, Mittal, Gautam, Luo, Michael, Stoica, Ion

论文摘要

查询优化器是每个数据库系统中的至关重要组件。由于它们的复杂性,优化者需要数月的专家才能写作和数年的精炼。在这项工作中,我们首次证明,在不从专家优化器中学习的情况下学习优化查询既可能又有效。我们提出Balsa,这是一个由深度加固学习构建的查询优化器。 Balsa首先从简单的,环境不足的模拟器中学习基本知识,然后在实际执行中安全学习。在加入订单基准测试中,Balsa匹配了两个专家查询优化器的性能,包括开源和商业商业,并进行了两个小时的学习,并且在几个小时后的工作负载运行时最多优于2.8美元$ \ times $。因此,巴尔萨(Balsa)开放了在不存在专家设计的优化器的未来计算环境中自动学习优化的可能性。

Query optimizers are a performance-critical component in every database system. Due to their complexity, optimizers take experts months to write and years to refine. In this work, we demonstrate for the first time that learning to optimize queries without learning from an expert optimizer is both possible and efficient. We present Balsa, a query optimizer built by deep reinforcement learning. Balsa first learns basic knowledge from a simple, environment-agnostic simulator, followed by safe learning in real execution. On the Join Order Benchmark, Balsa matches the performance of two expert query optimizers, both open-source and commercial, with two hours of learning, and outperforms them by up to 2.8$\times$ in workload runtime after a few more hours. Balsa thus opens the possibility of automatically learning to optimize in future compute environments where expert-designed optimizers do not exist.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源