3 ms·
Materialized views with pg_cron to refresh them? (Or even just cron and your usual interface, if you don't want to install something extra)
by Izkata 3y ago
Materialized views with pg_cron to refresh them? (Or even just cron and your usual interface, if you don't want to install something extra)
- TOMDM 3y agoThis solves the same problem, just not as well, the idea of an incrementaly maintained view is that only the update needs to be computed, so a count will increment or decrement as rows are inserted or deleted. It means complex views that could take minutes or hours to calculate from scratch can be kept fresh in realtime.
- physicles 3y agoI’ve built a few of these in snowflake for time series data (with dbt, which is fine but I don’t love it). My feeling so far is that the incremental bits are kinda fiddly and often domain-specific. Is it possible to define a single “shape” that would solve >90% of these incremental refresh scenarios?
- salojoo 3y agohttps://github.com/sraoss/pg_ivm https://github.com/sraoss/pg_ivm