Domain: Snowflake Features & Architecture
· 656 words · 10 min read

Compute Layer (Virtual Warehouses)

Overview

The Compute Layer is where the actual heavy lifting of query execution takes place. It consists of Virtual Warehouses, which are Massively Parallel Processing (MPP) compute clusters provisioned from the underlying cloud provider (AWS, Azure, GCP). Understanding Virtual Warehouses is critical for the COF-C03 exam, particularly regarding performance scaling and cost management.

Key Concepts

Virtual Warehouses

A Virtual Warehouse is one or more compute nodes working together to process queries. They are independent of the storage layer.

Auto-Suspend and Auto-Resume

To control costs, virtual warehouses can automatically suspend when inactive and resume when a query is submitted.

Concurrency and Multi-Cluster Warehouses

When too many users submit queries to a single warehouse simultaneously, queries may queue.

How It Works

Caching in the Compute Layer

Virtual Warehouses have local SSD storage used as a Data Cache (formerly called the Local Disk Cache).

Warehouse Types

SQL Examples


-- Create a new Virtual Warehouse with auto-suspend and auto-resume
CREATE WAREHOUSE my_bi_wh 
  WITH WAREHOUSE_SIZE = 'SMALL' 
  AUTO_SUSPEND = 300 -- 5 minutes
  AUTO_RESUME = TRUE 
  INITIALLY_SUSPENDED = TRUE;

-- Scale up a warehouse (Vertical scaling)
ALTER WAREHOUSE my_bi_wh SET WAREHOUSE_SIZE = 'LARGE';

-- Configure a Multi-Cluster Warehouse (Horizontal scaling - requires Enterprise Edition or higher)
ALTER WAREHOUSE my_bi_wh 
  SET MIN_CLUSTER_COUNT = 1 
      MAX_CLUSTER_COUNT = 3 
      SCALING_POLICY = 'STANDARD';

Exam Tips

⚠️ Crucial for COF-C03:

Key Takeaways