HERO: Hint-Based Efficient and Reliable Query Optimizer

Sergey Zinchenko, Sergey Iazov
12/3/2024
cs.DBcs.AIcs.LG

No official code found. Best implementation: zinchse/hero (2 stars, last commit 2024-12-08). 1 more below.

Abstract

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.

View on arXivView PDF

Code Implementations(2)

zinchse/heroCommunity100%

code for paper "Hero: Hint-based Efficient and Reliable query Optimizer"

21PythonApr 18, 20241 years ago
databasepaperquery-optimization-engine
zinchse/hbo_benchCommunity100%

platform for benchmarking hint-based optimisation approaches

10PythonAug 8, 20241 years ago
benchmarkdatabasedatasetopengausspostgresql+1 more

Similar Papers

Cite this paper

@article{zinchenko2024hero,
  title  = {HERO: Hint-Based Efficient and Reliable Query Optimizer},
  author = {Sergey Zinchenko and Sergey Iazov},
  year   = {2024},
  eprint = {2412.02372},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.02372v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.02372.svg)](https://codeofpaper.com/paper/2412.02372)

Discussion