How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Heinrich, Roman, Luthra, Manisha, Wehrstein, Johannes, Kornmayer, Harald, Binnig, Carsten
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911065390972928
author Heinrich, Roman
Luthra, Manisha
Wehrstein, Johannes
Kornmayer, Harald
Binnig, Carsten
author_facet Heinrich, Roman
Luthra, Manisha
Wehrstein, Johannes
Kornmayer, Harald
Binnig, Carsten
contents Traditionally, query optimizers rely on cost models to choose the best execution plan from several candidates, making precise cost estimates critical for efficient query execution. In recent years, cost models based on machine learning have been proposed to overcome the weaknesses of traditional cost models. While these models have been shown to provide better prediction accuracy, only limited efforts have been made to investigate how well Learned Cost Models (LCMs) actually perform in query optimization and how they affect overall query performance. In this paper, we address this by a systematic study evaluating LCMs on three of the core query optimization tasks: join ordering, access path selection, and physical operator selection. In our study, we compare seven state-of-the-art LCMs to a traditional cost model and, surprisingly, find that the traditional model often still outperforms LCMs in these tasks. We conclude by highlighting major takeaways and recommendations to guide future research toward making LCMs more effective for query optimization.
format Preprint
id arxiv_https___arxiv_org_abs_2502_01229
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks
Heinrich, Roman
Luthra, Manisha
Wehrstein, Johannes
Kornmayer, Harald
Binnig, Carsten
Databases
Traditionally, query optimizers rely on cost models to choose the best execution plan from several candidates, making precise cost estimates critical for efficient query execution. In recent years, cost models based on machine learning have been proposed to overcome the weaknesses of traditional cost models. While these models have been shown to provide better prediction accuracy, only limited efforts have been made to investigate how well Learned Cost Models (LCMs) actually perform in query optimization and how they affect overall query performance. In this paper, we address this by a systematic study evaluating LCMs on three of the core query optimization tasks: join ordering, access path selection, and physical operator selection. In our study, we compare seven state-of-the-art LCMs to a traditional cost model and, surprisingly, find that the traditional model often still outperforms LCMs in these tasks. We conclude by highlighting major takeaways and recommendations to guide future research toward making LCMs more effective for query optimization.
title How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks
topic Databases
url https://arxiv.org/abs/2502.01229