GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hints

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Sulimov, Pavel, Lehmann, Claude, Stockinger, Kurt
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909647856730112
author Sulimov, Pavel
Lehmann, Claude
Stockinger, Kurt
author_facet Sulimov, Pavel
Lehmann, Claude
Stockinger, Kurt
contents Query optimization has become a research area where classical algorithms are being challenged by machine learning algorithms. At the same time, recent trends in learned query optimizers have shown that it is prudent to take advantage of decades of database research and augment classical query optimizers by shrinking the plan search space through different types of hints (e.g. by specifying the join type, scan type or the order of joins) rather than completely replacing the classical query optimizer with machine learning models. It is especially relevant for cases when classical optimizers cannot fully enumerate all logical and physical plans and, as an alternative, need to rely on less robust approaches like genetic algorithms. However, even symbiotically learned query optimizers are hampered by the need for vast amounts of training data, slow plan generation during inference and unstable results across various workload conditions. In this paper, we present GenJoin - a novel learned query optimizer that considers the query optimization problem as a generative task and is capable of learning from a random set of subplan hints to produce query plans that outperform the classical optimizer. GenJoin is the first learned query optimizer that significantly and consistently outperforms PostgreSQL as well as state-of-the-art methods on two well-known real-world benchmarks across a variety of workloads using rigorous machine learning evaluations.
format Preprint
id arxiv_https___arxiv_org_abs_2411_04525
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hints
Sulimov, Pavel
Lehmann, Claude
Stockinger, Kurt
Databases
Artificial Intelligence
Query optimization has become a research area where classical algorithms are being challenged by machine learning algorithms. At the same time, recent trends in learned query optimizers have shown that it is prudent to take advantage of decades of database research and augment classical query optimizers by shrinking the plan search space through different types of hints (e.g. by specifying the join type, scan type or the order of joins) rather than completely replacing the classical query optimizer with machine learning models. It is especially relevant for cases when classical optimizers cannot fully enumerate all logical and physical plans and, as an alternative, need to rely on less robust approaches like genetic algorithms. However, even symbiotically learned query optimizers are hampered by the need for vast amounts of training data, slow plan generation during inference and unstable results across various workload conditions. In this paper, we present GenJoin - a novel learned query optimizer that considers the query optimization problem as a generative task and is capable of learning from a random set of subplan hints to produce query plans that outperform the classical optimizer. GenJoin is the first learned query optimizer that significantly and consistently outperforms PostgreSQL as well as state-of-the-art methods on two well-known real-world benchmarks across a variety of workloads using rigorous machine learning evaluations.
title GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hints
topic Databases
Artificial Intelligence
url https://arxiv.org/abs/2411.04525