Bao: Learning to Steer Query Optimizers

04/08/2020
by   Ryan Marcus, et al.
0

Query optimization remains one of the most challenging problems in data management systems. Recent efforts to apply machine learning techniques to query optimization challenges have been promising, but have shown few practical gains due to substantive training overhead, inability to adapt to changes, and poor tail performance. Motivated by these difficulties and drawing upon a long history of research in multi-armed bandits, we introduce Bao (the BAndit Optimizer). Bao takes advantage of the wisdom built into existing query optimizers by providing per-query optimization hints. Bao combines modern tree convolutional neural networks with Thompson sampling, a decades-old and well-studied reinforcement learning algorithm. As a result, Bao automatically learns from its mistakes and adapts to changes in query workloads, data, and schema. Experimentally, we demonstrate that Bao can quickly (an order of magnitude faster than previous approaches) learn strategies that improve end-to-end query execution performance, including tail latency. In cloud environments, we show that Bao can offer both reduced costs and better performance compared with a sophisticated commercial system.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/07/2019

Neo: A Learned Query Optimizer

Query optimization is one of the most challenging problems in database s...
research
06/11/2023

Kepler: Robust Learning for Faster Parametric Query Optimization

Most existing parametric query optimization (PQO) techniques rely on tra...
research
08/23/2021

No DBA? No regret! Multi-armed bandits for index tuning of analytical and HTAP workloads with provable guarantees

Automating physical database design has remained a long-term interest in...
research
09/26/2018

Towards a Hands-Free Query Optimizer through Deep Learning

Query optimization remains one of the most important and well-studied pr...
research
12/01/2021

Learned Autoscaling for Cloud Microservices with Multi-Armed Bandits

As cloud applications shift from monolithic architectures to loosely cou...
research
10/19/2020

DBA bandits: Self-driving index tuning under ad-hoc, analytical workloads with safety guarantees

Automating physical database design has remained a long-term interest in...
research
05/28/2022

Multi-agent Databases via Independent Learning

Machine learning is rapidly being used in database research to improve t...

Please sign up or login with your details

Forgot password? Click here to reset