HERO: Hint-Based Efficient and Reliable Query Optimizer

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Zinchenko, Sergey, Iazov, Sergey
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866929616637132800
author Zinchenko, Sergey
Iazov, Sergey
author_facet Zinchenko, Sergey
Iazov, Sergey
contents We propose a novel model for learned query optimization which provides query hints leading to better execution plans. The model addresses the three key challenges in learned hint-based query optimization: reliable hint recommendation (ensuring non-degradation of query latency), efficient hint exploration, and fast inference. We provide an in-depth analysis of existing NN-based approaches to hint-based optimization and experimentally confirm the named challenges for them. Our alternative solution consists of a new inference schema based on an ensemble of context-aware models and a graph storage for reliable hint suggestion and fast inference, and a budget-controlled training procedure with a local search algorithm that solves the issue of exponential search space exploration. In experiments on standard benchmarks, our model demonstrates optimization capability close to the best achievable with coarse-grained hints. Controlling the degree of parallelism (query dop) in addition to operator-related hints enables our model to achieve 3x latency improvement on JOB benchmark which sets a new standard for optimization. Our model is interpretable and easy to debug, which is particularly important for deployment in production.
format Preprint
id arxiv_https___arxiv_org_abs_2412_02372
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle HERO: Hint-Based Efficient and Reliable Query Optimizer
Zinchenko, Sergey
Iazov, Sergey
Databases
Artificial Intelligence
Machine Learning
H.2.4; I.2.6; I.2.8
We propose a novel model for learned query optimization which provides query hints leading to better execution plans. The model addresses the three key challenges in learned hint-based query optimization: reliable hint recommendation (ensuring non-degradation of query latency), efficient hint exploration, and fast inference. We provide an in-depth analysis of existing NN-based approaches to hint-based optimization and experimentally confirm the named challenges for them. Our alternative solution consists of a new inference schema based on an ensemble of context-aware models and a graph storage for reliable hint suggestion and fast inference, and a budget-controlled training procedure with a local search algorithm that solves the issue of exponential search space exploration. In experiments on standard benchmarks, our model demonstrates optimization capability close to the best achievable with coarse-grained hints. Controlling the degree of parallelism (query dop) in addition to operator-related hints enables our model to achieve 3x latency improvement on JOB benchmark which sets a new standard for optimization. Our model is interpretable and easy to debug, which is particularly important for deployment in production.
title HERO: Hint-Based Efficient and Reliable Query Optimizer
topic Databases
Artificial Intelligence
Machine Learning
H.2.4; I.2.6; I.2.8
url https://arxiv.org/abs/2412.02372