Salvato in:
Dettagli Bibliografici
Autori principali: Cheng, Qi, Sun, Yang, Yu, Weidong, Chen, Danny, Wang, Weicheng, Chen, Chong, Larson, Per-Ake
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:https://arxiv.org/abs/2605.05044
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914535091208192
author Cheng, Qi
Sun, Yang
Yu, Weidong
Chen, Danny
Wang, Weicheng
Chen, Chong
Larson, Per-Ake
author_facet Cheng, Qi
Sun, Yang
Yu, Weidong
Chen, Danny
Wang, Weicheng
Chen, Chong
Larson, Per-Ake
contents The query optimizer in a Database Management Systems (DBMS), translates declarative queries into efficient execution plans. Conventional bottom-up optimization consists of two main stages: Query Rewrite (QRW) and Cost-Based Optimization (CBO). However, applying a rewrite rule during QRW may not always be beneficial; the best choice may depend on the (estimated) execution cost of the original and rewritten expressions. Fully exploiting such cost-dependent rules necessitates interleaving QRW with frequent CBO invocations, thereby incurring substantial overhead and often impractical optimization times. To mitigate this inefficiency, we introduce a novel cost-based rewrite framework for bottom-up optimizers. The core of our approach is a multi-level caching mechanism for intermediate CBO results aimed at eliminating redundant computation. Furthermore, we establish and exploit upper cost bounds to intelligently prune the search space during optimization. We also contribute methodological solutions for caching and reusing intermediate plan results within a bottom-up optimizer architecture. The framework has been implemented in the GaussDB optimizer. Experiments show that it significantly reduces overall optimization time, demonstrating the effectiveness of our approach.
format Preprint
id arxiv_https___arxiv_org_abs_2605_05044
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Efficient Cost-Based Rewrite in a Bottom-Up Optimizer
Cheng, Qi
Sun, Yang
Yu, Weidong
Chen, Danny
Wang, Weicheng
Chen, Chong
Larson, Per-Ake
Databases
The query optimizer in a Database Management Systems (DBMS), translates declarative queries into efficient execution plans. Conventional bottom-up optimization consists of two main stages: Query Rewrite (QRW) and Cost-Based Optimization (CBO). However, applying a rewrite rule during QRW may not always be beneficial; the best choice may depend on the (estimated) execution cost of the original and rewritten expressions. Fully exploiting such cost-dependent rules necessitates interleaving QRW with frequent CBO invocations, thereby incurring substantial overhead and often impractical optimization times. To mitigate this inefficiency, we introduce a novel cost-based rewrite framework for bottom-up optimizers. The core of our approach is a multi-level caching mechanism for intermediate CBO results aimed at eliminating redundant computation. Furthermore, we establish and exploit upper cost bounds to intelligently prune the search space during optimization. We also contribute methodological solutions for caching and reusing intermediate plan results within a bottom-up optimizer architecture. The framework has been implemented in the GaussDB optimizer. Experiments show that it significantly reduces overall optimization time, demonstrating the effectiveness of our approach.
title Efficient Cost-Based Rewrite in a Bottom-Up Optimizer
topic Databases
url https://arxiv.org/abs/2605.05044