4 ms·
or you can use a materialized view https://www.postgresql.org/docs/current/static/rules-materializedviews.html https://www.postgresql.org/docs/current/static/r
by zspitzer 10y ago
or you can use a materialized view
https://www.postgresql.org/docs/current/static/rules-materializedviews.html https://www.postgresql.org/docs/current/static/rules-materia...
- jrochkind1 10y agoI don't think materialized views are an answer to this problem, precisely because postgres materialized views do not automatically update when the underlying data has changed.
- dragonwriter 10y agoSure, you have to write the code to do updates; but "materialized views" are a technique long used even in SQL databases that had no automated support for them; denormalized derived tables that are used for regular, recurring queries while the DB retains normalized base tables are a common thing (heck, in Enterprise environments, I've more than once run into a setup where custom maintenance of jury-rigged materialized views are used in a database system with strong materialized view support simply because the system has been around and maintained longer than the server software has had that support.)