0
0
Snowflakecloud~20 mins

Materialized views for repeated queries in Snowflake - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Materialized Views Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
How does Snowflake update a materialized view?

When you query a materialized view in Snowflake, how is the data updated?

AThe materialized view is updated asynchronously by Snowflake after base table changes, usually within minutes.
BThe materialized view is updated only when explicitly refreshed by the user.
CThe materialized view never updates; it is static after creation.
DThe materialized view is updated automatically and immediately after every base table change.
Attempts:
2 left
💡 Hint

Think about how Snowflake balances performance and freshness for materialized views.

Architecture
intermediate
2:00remaining
Choosing materialized views for query optimization

You have a query that aggregates sales data by region daily. Which scenario best justifies using a materialized view?

AThe query runs once a month and scans a small table.
BThe query runs multiple times a day on a large table and involves complex joins and aggregations.
CThe query is simple and runs only once after data loads.
DThe query is ad-hoc and unpredictable in frequency.
Attempts:
2 left
💡 Hint

Materialized views help most when queries are frequent and expensive.

security
advanced
2:00remaining
Access control on materialized views in Snowflake

Which statement about access control on materialized views in Snowflake is correct?

AUsers need SELECT privilege on the base tables to query the materialized view.
BMaterialized views inherit all privileges from the base tables automatically.
CGranting SELECT on the materialized view alone allows querying without base table privileges.
DMaterialized views cannot have privileges granted directly.
Attempts:
2 left
💡 Hint

Consider how Snowflake separates privileges for views and base tables.

Best Practice
advanced
2:00remaining
Best practice for maintaining materialized views with frequent base table updates

You have a base table updated every minute. What is the best practice to keep the materialized view efficient and fresh?

AUse clustering keys on the base table and monitor refresh lag to balance performance and freshness.
BAvoid materialized views; use direct queries instead for fresh data.
CCreate multiple materialized views for each update batch to avoid conflicts.
DManually drop and recreate the materialized view after each update.
Attempts:
2 left
💡 Hint

Think about how to optimize refresh performance and data freshness.

🧠 Conceptual
expert
2:00remaining
Materialized view limitations in Snowflake

Which of the following is a true limitation of materialized views in Snowflake?

AMaterialized views can be created on external tables.
BMaterialized views support all SQL functions and complex subqueries.
CMaterialized views automatically update instantly with zero lag.
DMaterialized views cannot reference other materialized views.
Attempts:
2 left
💡 Hint

Consider restrictions on dependencies and supported features.