Skip to main content
QUICK REVIEW

[Paper Review] Towards a Hands-Free Query Optimizer through Deep Learning

Ryan Marcus, Olga Papaemmanouil|arXiv (Cornell University)|Sep 26, 2018
Optimization and Search ProblemsComputer Science29 references43 citations
TL;DR

The paper advocates a deep reinforcement learning approach to end-to-end query optimization, introducing learning-from-demonstration and cost-model bootstrapping to overcome training and search-space challenges, and discusses incremental learning strategies.

ABSTRACT

Query optimization remains one of the most important and well-studied problems in database systems. However, traditional query optimizers are complex heuristically-driven systems, requiring large amounts of time to tune for a particular database and requiring even more time to develop and maintain in the first place. In this vision paper, we argue that a new type of query optimizer, based on deep reinforcement learning, can drastically improve on the state-of-the-art. We identify potential complications for future research that integrates deep learning with query optimization, and we describe three novel deep learning based approaches that can lead the way to end-to-end learning-based query optimizers.

Motivation & Objective

  • Motivate a shift from hand-tuned heuristics to DRL-based query optimization that can auto-tune for a database.
  • Identify challenges in applying DRL to the large search space of execution plans.
  • Propose concrete DRL approaches to bootstrap learning and leverage demonstrations and cost models.
  • Outline incremental learning strategies to gradually build end-to-end optimization capabilities.

Proposed method

  • Describe DRL fundamentals and policy gradient methods used for learning query optimization policies.
  • Present ReJOIN, a DRL-based join order enumerator, as a case study.
  • Outline three key DRL challenges for end-to-end optimization: search space size, reward signal, and evaluation overhead.
  • Propose two DRL approaches: learning from demonstration and cost model bootstrapping.
  • Discuss incremental learning designs to decompose optimization into simpler phases.

Experimental results

Research questions

  • RQ1Can DRL-based optimizers learn effective query plans without hand-crafted heuristics?
  • RQ2How can learning-from-demonstration accelerate DRL in query optimization?
  • RQ3Can cost-model bootstrapping provide a practical reward signal that speeds up convergence?
  • RQ4What incremental strategies enable scalable, end-to-end DRL optimizers for full execution plans?

Key findings

  • ReJOIN shows DRL can learn join order policies that approach or surpass PostgreSQL in latency after substantial training.
  • Final plans from ReJOIN can be faster than PostgreSQL's enumerator in many cases, despite training overhead.
  • Using the cost model as reward allows faster training but may hinge on the quality of the cost model.
  • Learning from demonstration can dramatically reduce training time by leveraging an expert optimizer.
  • Incremental learning strategies can decompose the optimization task to manage complexity.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.