May 2018
Intermediate to advanced
576 pages
30h 25m
English
If the part you put in the temporary table is large, does not change very often, and/or is hard to compute, then you may be able to do it less often for each query by using a technique named materialized views.
Materialized views are views that are prepared before they are used (similar to a cached table). They are either fully regenerated as underlying data changes or in some cases, can update only those rows that depend on the changed data.
PostgreSQL natively supports materialized views through the CREATE MATERIALIZED VIEW, ALTER MATERIALIZED VIEW, REFRESH MATERIALIZED VIEW, and DROP MATERIALIZED VIEW commands. At the time of writing, PostgreSQL supports full regeneration only of ...