DBMay 6

Efficient Cost-Based Rewrite in a Bottom-Up Optimizer

arXiv:2605.0504450.2
Predicted impact top 26% in DB · last 90 daysOriginality Incremental advance
AI Analysis

For DBMS query optimizers, this work addresses the practical problem of expensive optimization when cost-dependent rewrite rules are used.

The paper tackles the inefficiency of interleaving query rewrite with cost-based optimization in bottom-up optimizers. Their framework, implemented in GaussDB, reduces optimization time significantly via multi-level caching and cost-bound pruning.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes