pg_ivm - Extensions for Rapid Materialized View Update
summary
pg_ivm implements Incremental View Maintenance for PostgreSQL (13–17) as an extension that stores IMVs as tables and wires automatic updates with AFTER triggers and transition tables. It rewrites the view query to compute DeltaV and applies changes via INSERT/DELETE/UPDATE, auto-creating indexes when possible and adding auxiliary columns for aggregates. Typical results: a view that takes ~20s to refresh is updated in 20 milliseconds (about 500× faster), another case shows 150× faster. Tradeoffs: per-row update cost, concurrency locking, and limited support (no outer joins yet).
AI-written summary · about
chapters (10)
- 0:00Introduction to pg_ivm
- 2:27Concepts of IVM
- 6:57Purpose and Overview
- 10:56Supported features and usage
- 14:06Installation and command usage
- 20:07Implementation mechanics
- 31:50Performance evaluation
- 34:49Performance trade-offs
- 36:36Development and future plans
- 40:02Questions and answers
related talks
48mInside Postgres: why VACUUM matters
01h 08mIncremental View Maintenance 1
38mIncremental View Maintenance: Beyond Worst-Case Analysis I
49mIncremental Computation
50mSolving PostgreSQL Wicked Problems
02h 00mTutorial
01h 05mIncremental View Maintenance 2
21mRecent Advances in Incremental View Maintenance
