3 ms·
I’d like to refresh a portion of a materialized view. I have some big materialized views that take a long time to refresh concurrently, and I wish I could refr
by karmelapple 4y ago
I’d like to refresh a portion of a materialized view.
I have some big materialized views that take a long time to refresh concurrently, and I wish I could refresh a subset of the entire view’s data.
- dboreham 4y agoWhat do you mean by "refresh" here? Doesn't a materialized view get updated synchronously with updates to its constituent tables?
- samanator 4y agoNope, you must run REFRESH MATERIALIZED VIEW mymatview; Which does a full view update. See https://www.postgresql.org/docs/current/rules-materializedviews.html https://www.postgresql.org/docs/current/rules-materializedvi...
- Merad 4y agoI believe SQL Server does this, but Postgres does not.
- zX41ZdbW 4y agoIf Postgres were ClickHouse, it would refresh materialized views synchronously on INSERT... but for Postgres it isn't.
- mkleczek 4y agoMaybe https://github.com/sraoss/pg_ivm https://github.com/sraoss/pg_ivm might be of help?