News for hackers. Stuff that matters.
Re:PostgreSQL views and materialized views and how they infl... by cadbox1 on Thursday July 14, 2022 @08:34PM (#32103115)
I wanted incremental refresh in Postgres as well and found that you can manage your own table to get something close.

Basically you create a regular table in place of a materialised one, only aggregate data newer than what's currently in the table then store the new aggregates in table. Repeat this an interval.

https://github.com/cadbox1/prawn-stack/blob/master/src/backe...

I use this to show page view data aggregated by hour without calculating it on each request using Lambda

https://prawn.cadell.dev/

There are no comments on this comment yet.