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

JoinGym:一个用于强化学习的高效查询优化环境

JoinGym: An Efficient Query Optimization Environment for Reinforcement Learning

Cornell University(康奈尔大学)

Kaiwen Wang, Junxiong Wang, Yueying Li, Nathan Kallus, Immanuel Trummer, Wen Sun

AI总结:

本文提出 JoinGym,一个轻量高效的强化学习查询优化环境,支持左深和稠密连接顺序选择,通过离线模拟提升吞吐量,并发布基于真实 IMDb 的基数数据集,经基准测试发现算法成本呈重尾分布。

摘要:

连接顺序选择(JOS)是对连接操作进行排序以最小化总查询执行成本的问题,它是查询优化中的核心 NP-hard 组合优化问题。在本文中,我们提出了 JoinGym,这是一个轻量且易于使用的强化学习(RL)查询优化环境,能够同时捕获 JOS 问题的左深和稠密变体。与现有的查询优化环境相比,JoinGym 的关键优势在于可用性和显著更高的吞吐量,我们通过完全离线模拟查询执行来实现这一点。在底层机制上,JoinGym 通过从预计算的数据集中查找中间结果基数来模拟查询计划的成本。我们发布了一个基于真实 IMDb 工作负载的 3300 个 SQL 查询的新颖基数数据集,这可能具有独立的研究价值,例如用于基数估计。最后,我们对四种 RL 算法进行了广泛的基准测试,发现它们的成本分布呈重尾分布,这激发了未来在风险敏感 RL 方面的研究。总之,JoinGym 使用户能够快速在真实的数据库问题上进行 RL 算法的原型设计,而无需设置和运行实时系统。

英文摘要:

Join order selection (JOS) is the problem of ordering join operations to minimize total query execution cost and it is the core NP-hard combinatorial optimization problem of query optimization. In this paper, we present JoinGym, a lightweight and easy-to-use query optimization environment for reinforcement learning (RL) that captures both the left-deep and bushy variants of the JOS problem. Compared to existing query optimization environments, the key advantages of JoinGym are usability and significantly higher throughput which we accomplish by simulating query executions entirely offline. Under the hood, JoinGym simulates a query plan's cost by looking up intermediate result cardinalities from a pre-computed dataset. We release a novel cardinality dataset for $3300$ SQL queries based on real IMDb workloads which may be of independent interest, e.g., for cardinality estimation. Finally, we extensively benchmark four RL algorithms and find that their cost distributions are heavy-tailed, which motivates future work in risk-sensitive RL. In sum, JoinGym enables users to rapidly prototype RL algorithms on realistic database problems without needing to setup and run live systems.

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

↑