Stored Results
A regular view is just a saved query that recomputes every time. A materialized view stores the computed result on disk. Dashboards that read a rollup such as daily revenue per region can read the small precomputed table instead of scanning the raw facts.
Keeping It Fresh
The stored result drifts as new data arrives. Engines refresh it either fully by recomputing or incrementally by applying only new rows to the existing aggregate. Incremental refresh is cheaper but only works for aggregations that combine cleanly, like sums and counts.
Why Use Them
- Speed: read a tiny rollup instead of billions of facts.
- Consistency: every dashboard uses the same definition.
- Cost: heavy aggregation runs once, not per query.
Key idea
Materialized views store precomputed aggregates so analytics queries read a small rollup instead of scanning raw facts, traded against the cost of keeping the result fresh.