What is the difference between a standard View and a Materialized View? When is the extra storage cost of a Materialized View justified?
Last updated
A standard view is a saved query that re-runs on every access: always current, no storage, but no speedup.
A materialized view stores the precomputed result on disk for fast reads, but can be stale until refreshed (
REFRESH MATERIALIZED VIEW).Worth the cost for expensive joins or aggregations read far more often than data changes (e.g. dashboards tolerating slight staleness), not when data must be always current.
- https://docs.cloud.google.com/bigquery/docs/logical-materialized-view-overview
- https://docs.snowflake.com/en/user-guide/views-materialized
- https://docs.aws.amazon.com/prescriptive-guidance/latest/materialized-views-redshift/understanding-materialized-views.html
- https://www.postgresql.org/docs/current/rules-materializedviews.html
- https://medium.com/@artemkhrenov/database-views-and-materialized-views-the-smart-way-to-simplify-complex-queries-e674af9f2e5d
- https://medium.com/the-table-sql-and-devtalk/understanding-database-views-vs-materialized-views-37225d435f23
- https://hevodata.com/learn/what-are-bigquery-materialized-views/
- https://aws.amazon.com/blogs/aws/materialize-your-amazon-redshift-views-to-speed-up-query-execution/