0
0
Snowflakecloud~10 mins

Why virtual warehouses control compute independently in Snowflake - Visual Breakdown

Choose your learning style9 modes available
Process Flow - Why virtual warehouses control compute independently
User Query Arrives
Virtual Warehouse Receives Query
Warehouse Allocates Compute Resources
Query Executes Using Allocated Compute
Results Returned to User
Other Warehouse Receives Query
Allocates Its Own Compute Independently
Executes Query Separately
Returns Results Independently
Each virtual warehouse in Snowflake manages its own compute resources independently, allowing multiple queries to run in parallel without affecting each other.
Execution Sample
Snowflake
CREATE WAREHOUSE WH1 WITH WAREHOUSE_SIZE = 'SMALL';
CREATE WAREHOUSE WH2 WITH WAREHOUSE_SIZE = 'MEDIUM';
-- Run query on WH1
USE WAREHOUSE WH1;
SELECT COUNT(*) FROM SALES;
-- Run query on WH2
USE WAREHOUSE WH2;
SELECT COUNT(*) FROM CUSTOMERS;
Two virtual warehouses run queries independently, each using its own compute resources.
Process Table
StepWarehouseActionCompute AllocatedQuery StatusResult
1WH1Start QuerySmall Compute ClusterRunningN/A
2WH2Start QueryMedium Compute ClusterRunningN/A
3WH1Query ProcessingSmall Compute ClusterRunningN/A
4WH2Query ProcessingMedium Compute ClusterRunningN/A
5WH1Query CompleteSmall Compute ClusterCompletedCount from SALES
6WH2Query CompleteMedium Compute ClusterCompletedCount from CUSTOMERS
💡 Both warehouses complete their queries independently using their allocated compute resources.
Status Tracker
VariableStartAfter Step 2After Step 4Final
WH1 ComputeNoneSmall Cluster AllocatedSmall Cluster ActiveSmall Cluster Released
WH2 ComputeNoneMedium Cluster AllocatedMedium Cluster ActiveMedium Cluster Released
WH1 Query StatusIdleRunningRunningCompleted
WH2 Query StatusIdleRunningRunningCompleted
Key Moments - 2 Insights
Why does WH2 start allocating compute only after WH1 has started its query?
Each warehouse allocates compute independently when it receives a query, so WH2 starts allocation when its query begins, as shown in steps 2 and 4 of the execution table.
Can WH1 and WH2 share compute resources during query execution?
No, each virtual warehouse controls its own compute independently, so they do not share resources, preventing one query from slowing down another (see compute allocation columns in execution table).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what compute size does WH1 use during its query?
ALarge Compute Cluster
BMedium Compute Cluster
CSmall Compute Cluster
DNo Compute Allocated
💡 Hint
Check the 'Compute Allocated' column for WH1 in steps 1 and 3.
At which step does WH2 start running its query?
AStep 2
BStep 3
CStep 1
DStep 4
💡 Hint
Look at the 'Query Status' column for WH2 in the execution table.
If WH1 was resized to 'LARGE', how would the execution table change?
AWH2's compute allocation would change to Large Compute Cluster
BWH1's compute allocation would show Large Compute Cluster
CBoth warehouses would share Large Compute Cluster
DNo change in compute allocation
💡 Hint
Compute allocation depends on warehouse size per warehouse, see 'Compute Allocated' column.
Concept Snapshot
Virtual warehouses in Snowflake manage compute independently.
Each warehouse allocates its own compute resources when running queries.
This allows multiple queries to run in parallel without interference.
Warehouse size determines compute power allocated.
Compute resources are released after query completion.
Full Transcript
In Snowflake, virtual warehouses control compute independently. When a query is sent to a warehouse, it allocates compute resources based on its size. Multiple warehouses can run queries at the same time without sharing compute. This means one warehouse's workload does not slow down another. After queries finish, compute resources are released. This design allows flexible, scalable, and isolated query processing.