duckDBSP
Materialized views in DuckDB that update in O(delta), not O(n)
C++ · MIT · 2026 · active
A materialized view normally recomputes itself from scratch when anything underneath it changes. Insert one row into a million-row table and you pay for the million. DBSP — Database Stream Processing — says you should only pay for the delta, and duckDBSP is an experimental DuckDB extension that does exactly that.
Views are defined in ordinary SQL and can reference each other. Change data capture is
automatic, dbsp_changes() hands back the last sync’s output delta with signed weights,
and views survive a connection reopen without an explicit save. The core is header-only
C++ with no dependencies; disk-backed state and multi-core sync are both opt-in.
Experimental, and labelled that way on purpose. The interesting question is not whether incremental view maintenance works — it does — but how much of real SQL you can support before the incremental path stops being the fast path.