# sraoss/pg_ivm

IVM (Incremental View Maintenance) implementation as a PostgreSQL extension

Repository: https://github.com/sraoss/pg_ivm
Canonical: https://ross.abutalabs.com/products/pg_ivm
Language: C
License: NOASSERTION
License Family: other
Last push: 2026-08-24T14:28:40+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 66, longevity 100
- inputs: {"age_days": 1623, "days_push": 9, "days_rel": 64, "gap_med": 91, "n_releases_24m": 6}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1474, forks 51 (observed 2026-08-28T04:04:49.665793+00:00)

## What it is
pg_ivm is a PostgreSQL extension implementing Incremental View Maintenance (IVM), which keeps materialized views up to date by applying only incremental changes instead of full recomputation. It provides a create_immv function that creates incrementally maintainable materialized views updated automatically via AFTER triggers on base tables.

## Use cases
- keep materialized views up to date automatically in postgres
- avoid expensive REFRESH MATERIALIZED VIEW recomputation
- incrementally maintain views when base tables change
- create incrementally maintainable materialized views with create_immv
- speed up dashboards backed by materialized views
- maintain aggregate views efficiently on small data changes

## When to choose
- you use PostgreSQL 13-19 and need always-fresh materialized views
- base tables change frequently but only small parts of the view are affected
- you want immediate view maintenance within the same transaction

## When to avoid
- you need deferred or scheduled view maintenance rather than immediate updates
- you are not on PostgreSQL or cannot install C extensions
- your views change wholesale on every write, making recomputation cheaper

## Facets
- artifact type: plugin
- maturity: active
- function: database, caching
- domain: databases, performance, developer-tools
- platform: windows
- tags: postgresql-extension, incremental-view-maintenance, materialized-views, immv, c, linux, macos, postgresql

## Member repositories
- sraoss/pg_ivm (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:49.665793+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:34:34.527973+00:00, confidence not recorded.
  - readme: https://github.com/sraoss/pg_ivm (fetched 2026-08-28T04:04:49.665793+00:00, sha fbb66f70cfdc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
