SOL-C01 practice question 24 of 30

What is the main advantage of using Materialized Views in Snowflake?

Full set: 214 questions
Answer options
A: They always contain the latest data in real-time.
B: They can be directly updated by DML statements.
C: They physically store pre-computed results to improve query performance. Correct answer
D: They are primarily used for data masking.
Correct Answer:
C. They physically store pre-computed results to improve query performance.
Explanation

The main advantage of using a Materialized View (MV) in Snowflake is to improve query performance. An MV physically stores the pre-computed result of its definition query. When Snowflake's optimizer receives a query that can be resolved using the MV, it redirects the query to the MV instead of executing the complex query against the base tables. This is particularly effective for queries with large aggregations or joins that are executed frequently, as it provides much faster response times.

Why Incorrect

A. MVs are refreshed by a background process and are not guaranteed to be real-time; there is a small lag after base table updates.
B. Direct DML operations (INSERT, UPDATE, DELETE) are not allowed on a Materialized View in Snowflake. It is maintained automatically.
D. Data masking is a security feature implemented via masking policies, which is a separate concept from materialized views.

References

- Snowflake Documentation, "Working with Materialized Views". The overview section states, "A materialized view is a pre-computed data set derived from a query specification (the SELECT statement in the view definition) and stored for later use. Because the data is pre-computed, querying a materialized view is faster than executing the original query."

Scroll to Top