JoinGym: An Efficient Query Optimization Environment for Reinforcement Learning

07/21/2023
by   Kaiwen Wang, et al.
0

In this paper, we present JoinGym, an efficient and lightweight query optimization environment for reinforcement learning (RL). Join order selection (JOS) is a classic NP-hard combinatorial optimization problem from database query optimization and can serve as a practical testbed for the generalization capabilities of RL algorithms. We describe how to formulate each of the left-deep and bushy variants of the JOS problem as a Markov Decision Process (MDP), and we provide an implementation adhering to the standard Gymnasium API. We highlight that our implementation JoinGym is completely based on offline traces of all possible joins, which enables RL practitioners to easily and quickly test their methods on a realistic data management problem without needing to setup any systems. Moreover, we also provide all possible join traces on 3300 novel SQL queries generated from the IMDB dataset. Upon benchmarking popular RL algorithms, we find that at least one method can obtain near-optimal performance on train-set queries but their performance degrades by several orders of magnitude on test-set queries. This gap motivates further research for RL algorithms that generalize well in multi-task combinatorial optimization problems.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/30/2022

Solving the vehicle routing problem with deep reinforcement learning

Recently, the applications of the methodologies of Reinforcement Learnin...
research
12/10/2021

A Validation Tool for Designing Reinforcement Learning Environments

Reinforcement learning (RL) has gained increasing attraction in the acad...
research
08/09/2018

Learning to Optimize Join Queries With Deep Reinforcement Learning

Exhaustive enumeration of all possible join orders is often avoided, and...
research
01/14/2022

Reinforcement Learning to Solve NP-hard Problems: an Application to the CVRP

In this paper, we evaluate the use of Reinforcement Learning (RL) to sol...
research
07/13/2022

Reinforcement Learning Assisted Recursive QAOA

Variational quantum algorithms such as the Quantum Approximation Optimiz...
research
11/12/2021

One model Packs Thousands of Items with Recurrent Conditional Query Learning

Recent studies have revealed that neural combinatorial optimization (NCO...
research
10/07/2022

Population-Based Reinforcement Learning for Combinatorial Optimization

Applying reinforcement learning (RL) to combinatorial optimization probl...

Please sign up or login with your details

Forgot password? Click here to reset