When you query a materialized view in Snowflake, how is the data updated?
Think about how Snowflake balances performance and freshness for materialized views.
Snowflake updates materialized views asynchronously after changes to the base tables. This means the view is refreshed automatically but not immediately, allowing faster query performance while keeping data reasonably fresh.
You have a query that aggregates sales data by region daily. Which scenario best justifies using a materialized view?
Materialized views help most when queries are frequent and expensive.
Materialized views are most beneficial when queries are run frequently and involve costly operations like joins and aggregations on large datasets. This reduces query time by precomputing results.
Which statement about access control on materialized views in Snowflake is correct?
Consider how Snowflake separates privileges for views and base tables.
In Snowflake, granting SELECT on a materialized view allows users to query it without needing SELECT privileges on the underlying base tables. This simplifies access control.
You have a base table updated every minute. What is the best practice to keep the materialized view efficient and fresh?
Think about how to optimize refresh performance and data freshness.
Using clustering keys helps Snowflake efficiently maintain materialized views with frequent updates. Monitoring refresh lag allows balancing query speed and data freshness without manual intervention.
Which of the following is a true limitation of materialized views in Snowflake?
Consider restrictions on dependencies and supported features.
Snowflake does not allow materialized views to reference other materialized views. This prevents complex dependency chains and ensures maintainability.