Recent advances in query optimization have shifted from traditional rule-based and cost-based techniques towards machine learning-driven approaches. Among these, reinforcement learning (RL) has attracted significant attention due to its ability to optimize long-term performance by learning policies over query planning. However, existing RL-based query optimizers often exhibit unstable performance at the level of individual queries, including severe performance regressions, and require prolonged training to reach the plan quality of expert, cost-based optimizers. These shortcomings make learned query optimizers difficult to deploy in practice and remain a major barrier to their adoption in production database systems. To address these challenges, we present RELOAD, a robust and efficient learned query optimizer for database systems. RELOAD focuses on (i) robustness, by minimizing query-level performance regressions and ensuring consistent optimization behavior across executions, and (ii) efficiency, by accelerating convergence to expert-level plan quality. Through extensive experiments on standard benchmarks, including Join Order Benchmark, TPC-DS, and Star Schema Benchmark, RELOAD demonstrates up to 2.4x higher robustness and 3.1x greater efficiency compared to state-of-the-art RL-based query optimization techniques.
翻译:近年来,查询优化技术已从传统的基于规则和基于成本的方法转向机器学习驱动的方法。其中,强化学习因其能够通过学习查询规划策略来优化长期性能而受到显著关注。然而,现有的基于强化学习的查询优化器往往在单个查询层面表现出不稳定的性能,包括严重的性能退化,并且需要长时间训练才能达到专家级基于成本的优化器的规划质量。这些缺陷使得学习型查询优化器难以在实际中部署,并成为其在生产数据库系统中应用的主要障碍。为应对这些挑战,我们提出了RELOAD——一种鲁棒且高效的学习型数据库查询优化器。RELOAD聚焦于:(i)鲁棒性,通过最小化查询级性能退化并确保跨执行的一致优化行为;(ii)效率,通过加速收敛至专家级规划质量。在标准基准测试(包括Join Order Benchmark、TPC-DS和Star Schema Benchmark)上的大量实验表明,与最先进的基于强化学习的查询优化技术相比,RELOAD的鲁棒性提升高达2.4倍,效率提升高达3.1倍。