Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Risingwavelabs Risingwave Materialized View Processing

From Leeroopedia


Knowledge Sources
Domains Streaming, Query_Processing, Incremental_Computation
Last Updated 2026-02-09 07:00 GMT

Overview

An incremental computation mechanism that maintains continuously updated query results as new data arrives, eliminating the need for repeated full re-computation.

Description

Materialized View Processing is the core abstraction of a streaming database. Unlike traditional materialized views that are periodically refreshed, streaming materialized views are incrementally maintained — when new rows arrive at a source, only the delta (change) is propagated through the query plan, updating the stored result.

This approach builds on research in incremental view maintenance (IVM) and dataflow processing. The SQL query defining the materialized view is compiled into a streaming execution plan (a directed acyclic graph of operators), which is then distributed across compute nodes for parallel execution.

RisingWave supports standard SQL operators in materialized views including SELECT, WHERE, GROUP BY, JOIN, UNION, window functions, and HAVING clauses. The results are persisted in the storage layer (Hummock) and are immediately queryable via standard SQL SELECT statements.

Usage

Use materialized views when you need:

  • Real-time aggregations over streaming data (counts, sums, averages)
  • Continuous joins between multiple streams or tables
  • Pre-computed query results for low-latency serving
  • Complex event processing with SQL semantics

Theoretical Basis

Incremental view maintenance follows the delta propagation model:

MVt+1=MVt+Δ(MV,Δinput)

Where:

  • MVt is the materialized view state at time t
  • Δinput is the new input data (insertions, deletions, updates)
  • Δ(MV,Δinput) is the incremental change computed by the streaming operators

Pseudo-code for streaming MV execution:

for each barrier epoch:
    for each input change (insert/delete/update):
        propagate change through operator DAG
        apply delta to downstream operators
    checkpoint MV state to persistent storage

The execution uses a barrier-based consistency model where periodic barriers flow through the dataflow graph to ensure exactly-once processing and consistent snapshots.

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment