Hacker News new | ask | show | jobs
by habibur 1264 days ago
If materialized view doesn't refresh data on insert/update, this basically works similar to a cache.

Caching the front page, server side, instead of rendering it on every request would have given similar result -- my guess. Specially when the query was taking 900ms.

1 comments

If you only have a single application in front of it, that's a valid approach. If you have multiple applications- maybe a separate reporting tool, for example- you now have the problem of maintaining and invalidating multiple caches.

Much easier to keep the cache located with the data since the cache changes when the data does.