Workload acceleration by optimizing materialized view selection using local search

Kaina Anderson, Yohanes Yohanie Fridelin Panduman, Yuya Sasaki, Makoto OnizukaarXiv 2026

TL;DR

This paper introduces a novel method for accelerating database workloads by optimizing how materialized views are selected. By integrating incremental view maintenance costs directly into an Integer Linear Program (ILP) and using a smart local search heuristic based on sub-query containment, the approach achieves near-optimal query performance with negligible optimization overhead, significantly outperforming state-of-the-art methods like BIGSUBS.

What Problem Does This Paper Address?

In database management, materialized views—physically storing the results of frequent sub-queries—are a classic way to speed up query execution. However, they come with a major catch: whenever the underlying tables are updated, the materialized views must be updated too. This creates a fundamental trade-off between query acceleration benefits and view maintenance overhead.

Figure 1: An example of workload. Sub-queries shared across multiple queries: sub-query 𝑠1 (blue line) is shared by four queries 𝑞1-𝑞4, sub-query 𝑠2 (green line) is shared by 𝑞2 and 𝑞4, and sub-query 𝑠3 (red line) is shared by 𝑞2 and 𝑞3.

Existing state-of-the-art methods like BIGSUBS try to balance this trade-off but suffer from two core limitations:

  1. Poor Cost Modeling: They rely on simple storage capacity constraints as a proxy for maintenance overhead, which doesn't accurately reflect the actual computational cost of processing data updates.
  2. Suboptimal Selection: They use probabilistic techniques that often miss high-quality view combinations, leaving significant performance gains on the table.

Methods

The authors propose a structured workflow that directly models incremental maintenance costs and uses an optimization heuristic to find the best views efficiently.

Figure 2: Workflow consisting of 1) sub-query extraction, 2) materialized view (MV) selection, 3) view materialization, and 4) rewriting queries using materialized views.

The core technical contributions lie in how the views are selected:

  • Mathematical Formulation (ILP): The authors formulate view selection as an Integer Linear Program (ILP) where the objective function explicitly maximizes sub-query utility minus the estimated incremental view maintenance cost.
  • Local Search Heuristic: Because solving a full ILP is NP-hard and scales poorly with large workloads, the authors implement a Local Search strategy. Instead of searching the entire solution space, the algorithm iteratively explores "neighboring" solutions.
  • Sub-Query Containment Neighborhoods: To define a neighborhood, the authors leverage query plan trees. If one sub-query contains another (a parent-child relationship in the execution tree), they are considered neighbors. This insight works because nested or overlapping sub-queries tend to share similar workload benefits.
  • Initial Solution Selection: To kickstart the local search, the authors test three metrics to pick the top-$k$ initial views: sub-query frequency (topk-F), total utility (topk-U), and utility per storage unit (topk-E).

Datasets

The method was evaluated using Redbench, a modern benchmark designed to simulate real-world query frequencies on cloud data warehouses (specifically Amazon Redshift).

  • Base Database: The IMDb dataset (7,085 MB across 21 tables).
  • Workload: 1,073 queries derived from 83 unique templates from the Join Ordering Benchmark (JOB).
  • Updates: The authors synthetically added 1,000 insert operations to evaluate the view maintenance cost models, filling a gap since the standard Redbench workload is read-only.

Key Insights and Ideas

  • Frequency Beats Raw Utility: Intuitively, one might think that starting the local search with the highest-utility views (topk-U) would yield the fastest workload. However, starting with the most frequent sub-queries (topk-F) resulted in the lowest overall execution time. Frequency-based initialization helps the local search avoid getting trapped in complex, high-cost local optima.
  • Storage is a Poor Proxy for Maintenance: The paper proves that explicitly calculating delta expressions for updates (e.g., modeling join fan-outs during inserts/deletes) provides a vastly superior optimization signal compared to simply capping total storage size.
  • The Power of Localization: By restricting the ILP solver to localized neighborhoods (extended sub-queries), the number of decision variables drops dramatically ($|E_t| \ll |S|$), turning a computationally prohibitive problem into one that resolves in seconds.

Key Results

The proposed method strikes an incredible balance between optimization speed and execution performance:

  • Total Workload Time: The topk-F approach completed the entire benchmark rerun (including optimization, view generation, and execution) in 370.98 seconds, outperforming BIGSUBS (508.18s) and a Naive ILP approach (440.68s).
  • Optimization Overhead: While the Naive ILP took a prohibitive 79.75 seconds just to choose the views, the proposed local search method took only 1.29 seconds, yet captured 97% of the optimal view utility (3,272K vs 3,374K).
  • Adaptability to Updates: As the number of insert operations scaled from 0 to 2,000, the proposed method smoothly adapted by selecting views less sensitive to update costs, whereas BIGSUBS showed erratic, unstable utility due to its probabilistic nature.

Limitations and Future Work

While highly effective, the authors note a few areas for improvement:

  • Workload Complexity: The current evaluation using the JOB benchmark lacks complex query patterns like nested sub-queries. Testing on more generalized, varied workloads is a necessary next step.
  • Physical vs. Estimated Costs: The maintenance costs are currently estimated using database EXPLAIN commands. The authors plan to integrate their framework directly with PostgreSQL's native incremental view maintenance features to measure actual physical update times.
  • Framework Integration: Future work includes applying this method to the wvlet framework to automate logical plan extraction and query rewriting seamlessly.

Summary updated

BibTeX
@misc{anderson2026workload,
  author = {Kaina Anderson and Yohanes Yohanie Fridelin Panduman and Yuya Sasaki and Makoto Onizuka},
  title = {{Workload acceleration by optimizing materialized view selection using local search}},
  year = {2026},
  eprint = {2606.03772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.03772},
}
Figure