0
0
Snowflakecloud~20 mins

Query profiling and the query plan in Snowflake - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Query Profiling Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Understanding Query Profile Output

After running a complex SELECT query in Snowflake, you open the query profile. Which of the following best describes what the "Execution Time" metric represents?

AThe total time Snowflake spent parsing the SQL statement before execution.
BThe time taken by Snowflake to execute the query including all steps like scanning, joining, and aggregating data.
CThe time Snowflake spent transferring the query results back to the client.
DThe time Snowflake spent compiling the query plan but not running the query.
Attempts:
2 left
💡 Hint

Think about what "execution" means in the context of running a query.

🧠 Conceptual
intermediate
2:00remaining
Identifying Query Plan Components

In Snowflake's query plan, which component is responsible for determining the order and method of joining tables?

AResult Cache
BQuery Parser
CQuery Optimizer
DWarehouse Manager
Attempts:
2 left
💡 Hint

Consider which part decides how to best run the query.

Architecture
advanced
3:00remaining
Analyzing Query Profile for Performance Bottlenecks

You notice a Snowflake query is running slower than expected. The query profile shows a large percentage of time spent in "Spilling to Disk". What does this indicate and what is the best immediate action?

AThe query is using more memory than available; increase warehouse size or optimize query to reduce memory use.
BThe query is waiting for network transfer; increase warehouse size to speed up network.
CThe query is blocked by locks; kill other queries to release locks.
DThe query is waiting on result caching; clear cache to force fresh execution.
Attempts:
2 left
💡 Hint

Spilling to disk usually means memory is insufficient.

security
advanced
2:30remaining
Query Profile and Data Access Auditing

Which part of Snowflake's query profile can help you verify which tables and columns were accessed during a query for auditing purposes?

AResult Cache details showing cached results.
BQuery Text section showing the SQL statement.
CWarehouse Usage statistics showing compute time.
DQuery Profile's <strong>"Objects Accessed"</strong> section listing tables and columns used.
Attempts:
2 left
💡 Hint

Look for where Snowflake shows what data was touched.

Best Practice
expert
3:00remaining
Optimizing Query Plans for Large Joins

You have a query joining two large tables in Snowflake. The query profile shows a "Broadcast Join" was chosen by the optimizer, but the query runs slowly and uses excessive resources. What is the best next step to improve performance?

AForce a <strong>Shuffle Join</strong> by rewriting the query or using query hints to avoid broadcasting large tables.
BIncrease the warehouse size to handle the broadcast join better without changes.
CDisable result caching to force fresh data processing.
DSplit the query into multiple smaller queries to avoid joins.
Attempts:
2 left
💡 Hint

Broadcast joins send one table to all nodes; think about when this is efficient.