GRACEFUL: A Learned Cost Estimator For UDFs

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Wehrstein, Johannes, Bang, Tiemo, Heinrich, Roman, Binnig, Carsten
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915219172753408
author Wehrstein, Johannes
Bang, Tiemo
Heinrich, Roman
Binnig, Carsten
author_facet Wehrstein, Johannes
Bang, Tiemo
Heinrich, Roman
Binnig, Carsten
contents User-Defined-Functions (UDFs) are a pivotal feature in modern DBMS, enabling the extension of native DBMS functionality with custom logic. However, the integration of UDFs into query optimization processes poses significant challenges, primarily due to the difficulty of estimating UDF execution costs. Consequently, existing cost models in DBMS optimizers largely ignore UDFs or rely on static assumptions, resulting in suboptimal performance for queries involving UDFs. In this paper, we introduce GRACEFUL, a novel learned cost model to make accurate cost predictions of query plans with UDFs enabling optimization decisions for UDFs in DBMS. For example, as we show in our evaluation, using our cost model, we can achieve 50x speedups through informed pull-up/push-down filter decisions of the UDF compared to the standard case where always a filter push-down is applied. Additionally, we release a synthetic dataset of over 90,000 UDF queries to promote further research in this area.
format Preprint
id arxiv_https___arxiv_org_abs_2503_23863
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle GRACEFUL: A Learned Cost Estimator For UDFs
Wehrstein, Johannes
Bang, Tiemo
Heinrich, Roman
Binnig, Carsten
Databases
User-Defined-Functions (UDFs) are a pivotal feature in modern DBMS, enabling the extension of native DBMS functionality with custom logic. However, the integration of UDFs into query optimization processes poses significant challenges, primarily due to the difficulty of estimating UDF execution costs. Consequently, existing cost models in DBMS optimizers largely ignore UDFs or rely on static assumptions, resulting in suboptimal performance for queries involving UDFs. In this paper, we introduce GRACEFUL, a novel learned cost model to make accurate cost predictions of query plans with UDFs enabling optimization decisions for UDFs in DBMS. For example, as we show in our evaluation, using our cost model, we can achieve 50x speedups through informed pull-up/push-down filter decisions of the UDF compared to the standard case where always a filter push-down is applied. Additionally, we release a synthetic dataset of over 90,000 UDF queries to promote further research in this area.
title GRACEFUL: A Learned Cost Estimator For UDFs
topic Databases
url https://arxiv.org/abs/2503.23863