Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)


This 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.


I’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?





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: