Bird
Raised Fist0
Snowflakecloud~20 mins

Warehouse selection strategies in Snowflake - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Snowflake Warehouse Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding warehouse sizing impact on query performance

Which Snowflake warehouse size will generally provide the fastest query execution for a large, complex data transformation workload?

AX-Small warehouse, because it uses fewer credits and is more cost-efficient
BSmall warehouse, because it balances cost and performance for all workloads
CMedium warehouse, because it automatically scales to the workload size
DLarge warehouse, because it has more compute resources to process queries faster
Attempts:
2 left
💡 Hint

Think about how more compute resources affect processing speed.

❓ service_behavior
intermediate
2:00remaining
Effect of auto-suspend on warehouse cost and availability

What happens when a Snowflake warehouse is configured with auto-suspend set to 5 minutes?

AThe warehouse runs continuously for at least 5 minutes before suspending, regardless of query activity
BThe warehouse suspends automatically after 5 minutes of inactivity, reducing cost but causing a delay when resuming queries
CThe warehouse suspends immediately after each query completes, saving maximum credits
DThe warehouse never suspends automatically and must be manually stopped
Attempts:
2 left
💡 Hint

Consider how auto-suspend balances cost and query latency.

❓ Architecture
advanced
2:00remaining
Choosing warehouse strategy for concurrent user workloads

Your company has many users running queries simultaneously. Which warehouse strategy best supports high concurrency without queuing delays?

AUse multiple small warehouses manually assigned to different user groups
BUse a single X-Small warehouse and rely on query queuing
CUse a single large warehouse with multi-cluster enabled to scale out automatically
DUse a Medium warehouse with auto-suspend disabled
Attempts:
2 left
💡 Hint

Think about how Snowflake handles many simultaneous queries.

❓ security
advanced
2:00remaining
Securing warehouse access with role-based policies

Which approach best restricts warehouse usage to authorized users in Snowflake?

AGrant warehouse usage privileges only to specific roles and assign users to those roles
BAllow all users to use the warehouse but monitor usage logs for unauthorized queries
CDisable warehouse auto-resume to prevent unauthorized query execution
DUse network policies to block access to the warehouse endpoint
Attempts:
2 left
💡 Hint

Consider Snowflake's role-based access control features.

✅ Best Practice
expert
2:00remaining
Optimizing cost and performance with warehouse auto-scaling policies

You want to optimize both cost and performance for a variable workload using Snowflake warehouses. Which configuration achieves this best?

AEnable multi-cluster warehouse with minimum clusters set to 1 and maximum clusters set to 5, with auto-suspend after 10 minutes
BUse a single large warehouse with auto-suspend disabled to avoid delays
CUse multiple X-Small warehouses manually started and stopped by users
DSet auto-suspend to 1 minute and disable auto-resume to control costs strictly
Attempts:
2 left
💡 Hint

Think about how auto-scaling and auto-suspend work together.

Practice

(1/5)
1. What does the USE WAREHOUSE command do in Snowflake?
easy
A. It lists all available warehouses.
B. It switches the current warehouse to run queries.
C. It deletes an existing warehouse.
D. It creates a new warehouse.

Solution

  1. Step 1: Understand the purpose of USE WAREHOUSE

    This command changes which warehouse is active for running queries.
  2. Step 2: Compare with other commands

    Creating, deleting, or listing warehouses use different commands, not USE WAREHOUSE.
  3. Final Answer:

    It switches the current warehouse to run queries. -> Option B
  4. Quick Check:

    USE WAREHOUSE changes active warehouse [OK]
Hint: Remember: USE means switch active warehouse [OK]
Common Mistakes:
  • Confusing USE with CREATE or DROP commands
  • Thinking it lists warehouses
  • Assuming it modifies warehouse size
2. Which of the following is the correct syntax to switch to a warehouse named COMPUTE_WH?
easy
A. USE WAREHOUSE COMPUTE_WH;
B. SWITCH WAREHOUSE COMPUTE_WH;
C. SELECT WAREHOUSE COMPUTE_WH;
D. CHANGE WAREHOUSE TO COMPUTE_WH;

Solution

  1. Step 1: Recall the correct command syntax

    The command to switch warehouses is USE WAREHOUSE <name>;.
  2. Step 2: Check each option

    Only USE WAREHOUSE COMPUTE_WH; matches the correct syntax exactly.
  3. Final Answer:

    USE WAREHOUSE COMPUTE_WH; -> Option A
  4. Quick Check:

    Correct syntax = USE WAREHOUSE [name]; [OK]
Hint: USE WAREHOUSE plus name switches warehouse [OK]
Common Mistakes:
  • Using SWITCH or CHANGE instead of USE
  • Adding extra keywords like TO or SELECT
  • Missing semicolon at end
3. Given the following commands run in order:
USE WAREHOUSE SMALL_WH;
SELECT CURRENT_WAREHOUSE();
USE WAREHOUSE LARGE_WH;
SELECT CURRENT_WAREHOUSE();

What will be the output of the two CURRENT_WAREHOUSE() calls?
medium
A. SMALL_WH then LARGE_WH
B. LARGE_WH then SMALL_WH
C. SMALL_WH twice
D. LARGE_WH twice

Solution

  1. Step 1: Analyze the first USE WAREHOUSE command

    The first command sets the active warehouse to SMALL_WH, so the first CURRENT_WAREHOUSE() returns SMALL_WH.
  2. Step 2: Analyze the second USE WAREHOUSE command

    The second command switches the active warehouse to LARGE_WH, so the second CURRENT_WAREHOUSE() returns LARGE_WH.
  3. Final Answer:

    SMALL_WH then LARGE_WH -> Option A
  4. Quick Check:

    Warehouse switches reflect in CURRENT_WAREHOUSE() [OK]
Hint: Each USE WAREHOUSE changes current warehouse immediately [OK]
Common Mistakes:
  • Assuming warehouse does not change after second USE
  • Mixing order of outputs
  • Thinking CURRENT_WAREHOUSE() returns session name
4. You run the command USE WAREHOUSE BIG_WH but get an error saying the warehouse does not exist. What is the most likely cause?
medium
A. The command requires a semicolon at the end.
B. You need to restart your Snowflake session.
C. You must create a database before switching warehouses.
D. The warehouse name is misspelled or does not exist.

Solution

  1. Step 1: Understand the error message

    The error says the warehouse does not exist, so the name is likely wrong or missing.
  2. Step 2: Evaluate other options

    Restarting session or creating a database is unrelated; semicolon missing usually causes syntax error, not 'does not exist'.
  3. Final Answer:

    The warehouse name is misspelled or does not exist. -> Option D
  4. Quick Check:

    Nonexistent warehouse name causes error [OK]
Hint: Check warehouse name spelling if 'does not exist' error appears [OK]
Common Mistakes:
  • Restarting session unnecessarily
  • Confusing warehouse with database
  • Ignoring error message details
5. You have two warehouses: SMALL_WH with 1 cluster and LARGE_WH with 4 clusters. You want to run a heavy query quickly but also save costs on light queries. Which strategy is best?
hard
A. Always use LARGE_WH for all queries to ensure speed.
B. Use SMALL_WH only and increase its size when needed.
C. Use SMALL_WH for light queries and switch to LARGE_WH for heavy queries.
D. Create a new warehouse for each query type.

Solution

  1. Step 1: Understand warehouse sizes and costs

    SMALL_WH is cheaper and good for light work; LARGE_WH is bigger and faster but costs more.
  2. Step 2: Choose strategy balancing speed and cost

    Switching warehouses based on query load saves cost and improves performance.
  3. Final Answer:

    Use SMALL_WH for light queries and switch to LARGE_WH for heavy queries. -> Option C
  4. Quick Check:

    Match warehouse size to query load for cost and speed [OK]
Hint: Match warehouse size to query weight, switch as needed [OK]
Common Mistakes:
  • Using large warehouse always wastes cost
  • Trying to resize warehouses dynamically
  • Creating many warehouses unnecessarily
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard