A Snowflake materialized view stores pre-computed query results, letting users query faster at the cost of extra storage and refresh overhead.
A materialized view in Snowflake is a physical copy of a SELECT query’s result set. Snowflake keeps the copy automatically synchronized with source tables, so reads become much faster while writes incur extra maintenance cost.
Standard views run the SELECT each time, which can be slow on large joins. Materialized views trade extra storage and compute credits for sub-second reads, ideal for dashboards, KPIs, and API endpoints that hit the same query repeatedly.
Use CREATE MATERIALIZED VIEW with an optimized SELECT. Include only columns and rows you need. Avoid non-deterministic functions and SELECT *. Keep the result small to limit maintenance cost.
1. Verify base tables are clustered on common join keys.
2. Grant USAGE & SELECT on tables to the role that will own the view.
3. Run CREATE MATERIALIZED VIEW (see syntax below).
4. Query the view like a table.
Simply SELECT from it. No special syntax is required, and the optimizer may even rewrite queries to use the view automatically when it matches the pattern.
Snowflake refreshes incrementally after DML on source tables. Manual refresh is rarely needed, but ALTER MATERIALIZED VIEW ... RECLUSTER can force a rebuild if performance degrades.
Storage cost equals the compressed size of the view. Compute credits are consumed during background refreshes. Narrow, highly selective views keep both costs low.
• Project only necessary columns
• Filter rows aggressively
• Cluster source tables on join/filter keys
• Monitor credit usage with ACCOUNT_USAGE.MATERIALIZED_VIEW_REFRESH_HISTORY
• Drop unused views promptly to stop ongoing charges
Yes. Snowflake detects DML on source tables and incrementally updates the view in the background.
Run ALTER MATERIALIZED VIEW my_view RECLUSTER to trigger a complete refresh when clustering or statistics drift.
Query SNOWFLAKE.ACCOUNT_USAGE.MATERIALIZED_VIEW_REFRESH_HISTORY to inspect credit consumption and refresh duration.