Snowflake

What is a Snowflake Virtual Warehouse? Compute Management Guide

2026-03-21
更新: 2026-03-27
NicheeLab Editorial Team

A Virtual Warehouse is an independent compute cluster that makes up the Compute Layer of Snowflake's three-layer architecture. Every compute operation — SQL query execution, data loading, data transformation — runs on a Virtual Warehouse. It is completely decoupled from the Storage Layer, so you can create, size, and manage multiple Warehouses independently for different workloads.

Basic Architecture of a Virtual Warehouse

A Virtual Warehouse is a set of compute resources dynamically provisioned on a cloud provider (AWS/Azure/GCP). Each Warehouse is fully isolated, so load on one Warehouse never affects another.

  • Storage isolation: every Warehouse can read the same data in the Storage Layer — no data duplication required
  • Elasticity: resizing takes effect immediately, with no downtime
  • Independence: no resource contention between Warehouses, making workload isolation easy
  • Pay-per-use billing: credits are consumed based on runtime, with zero cost while suspended

Size Comparison Table (XS to 6XL)

Warehouses come in 8 sizes. Each step up roughly doubles the compute resources — and the credit consumption.

SizeCredits/hourNode count (relative)Recommended workload
X-Small(XS)11Development, testing, lightweight analytics, SnowSQL operations
Small(S)22Mid-size analytics, small ETL jobs
Medium(M)44Mid-to-large analytics, BI tool connections
Large(L)88Large-scale ETL, reporting
X-Large(XL)1616Large-scale batch processing
2X-Large(2XL)3232Very large batch jobs, complex JOINs
3X-Large(3XL)6464Enterprise-scale data processing
4X-Large〜6X-Large128〜512128〜512Extremely large data processing (specialized use cases)

Billing starts at a 60-second minimum, after which it shifts to per-second billing. Note that even if you suspend a Warehouse immediately after resuming it, you are still charged for a full 60 seconds of credits.

Creating and Modifying a Warehouse

-- Create a Warehouse
CREATE OR REPLACE WAREHOUSE analytics_wh
  WAREHOUSE_SIZE = 'MEDIUM'
  AUTO_SUSPEND = 120
  AUTO_RESUME = TRUE
  MIN_CLUSTER_COUNT = 1
  MAX_CLUSTER_COUNT = 1
  INITIALLY_SUSPENDED = TRUE
  COMMENT = 'Analytics Warehouse for analysts';

-- Resize (effective immediately, no downtime)
ALTER WAREHOUSE analytics_wh
  SET WAREHOUSE_SIZE = 'LARGE';

-- Change Auto-suspend setting
ALTER WAREHOUSE analytics_wh
  SET AUTO_SUSPEND = 60;

-- Manual suspend / resume
ALTER WAREHOUSE analytics_wh SUSPEND;
ALTER WAREHOUSE analytics_wh RESUME;

Auto-suspend / Auto-resume

Auto-suspend and Auto-resume are the most fundamental — and most effective — settings for Warehouse cost management.

Auto-suspend

When a Warehouse stays idle for the specified number of seconds, it is automatically suspended. While suspended, it consumes zero credits. The default is 600 seconds (10 minutes).

Auto-resume

When a query is submitted to a suspended Warehouse, it automatically resumes. This is enabled by default. Resuming takes a few seconds to tens of seconds, so for latency-sensitive workloads consider keeping the Warehouse always on.

Recommended Settings by Workload

WorkloadRecommended Auto-suspendReason
Ad-hoc analytics60-120 secIntermittent query patterns; a short setting reduces cost
Dashboards / BI300-600 secQueries arrive continuously; avoid frequent resume/suspend cycles
ETL batch60 secSuspend immediately after the job finishes
Snowpipe integration(Snowpipe is serverless)No Warehouse required

Warehouse Cache (Local Disk Cache)

While running, a Warehouse caches micro-partitions read from the Storage Layer onto local SSD. Subsequent reads of the same data are served quickly from this cache.

  • Suspending the Warehouse clears the Warehouse Cache
  • After resume, the cache is empty, so the first query has to perform a full scan from the Storage Layer
  • Setting Auto-suspend too low can hurt cache hit rates and actually degrade performance

Multi-cluster Warehouse

A Multi-cluster Warehouse runs multiple compute clusters in parallel under the same Warehouse. It is available on Enterprise Edition or higher and prevents queuing when concurrent query volume grows.

Scale-up vs. Scale-out

ApproachMethodEffectUse case
Scale-upIncrease Warehouse size (e.g. M to L)Boosts the processing power of individual queriesComplex queries, large data scans
Scale-outIncrease cluster count via Multi-clusterRaises the cap on concurrent queriesMany users accessing concurrently

Creating a Multi-cluster Warehouse

-- Multi-cluster Warehouse (up to 3 clusters, Standard policy)
CREATE OR REPLACE WAREHOUSE dashboard_wh
  WAREHOUSE_SIZE = 'MEDIUM'
  MIN_CLUSTER_COUNT = 1
  MAX_CLUSTER_COUNT = 3
  SCALING_POLICY = 'STANDARD'
  AUTO_SUSPEND = 300
  AUTO_RESUME = TRUE;

-- Switch to Economy policy
ALTER WAREHOUSE dashboard_wh
  SET SCALING_POLICY = 'ECONOMY';

Scaling Policies

PolicyWhen to add clustersPriority
Standard (default)Added as soon as queries start queuingPerformance first
EconomyAdded only after existing clusters become heavily utilizedCost first

Cost Optimization Best Practices

Separate Warehouses by Workload

-- ETL (larger size, short Auto-suspend)
CREATE WAREHOUSE etl_wh
  WAREHOUSE_SIZE = 'LARGE'
  AUTO_SUSPEND = 60
  AUTO_RESUME = TRUE;

-- Analytics (medium size, moderate Auto-suspend)
CREATE WAREHOUSE analytics_wh
  WAREHOUSE_SIZE = 'MEDIUM'
  AUTO_SUSPEND = 300
  AUTO_RESUME = TRUE;

-- Development (smallest, short Auto-suspend)
CREATE WAREHOUSE dev_wh
  WAREHOUSE_SIZE = 'XSMALL'
  AUTO_SUSPEND = 60
  AUTO_RESUME = TRUE;

Budget Control with Resource Monitors

-- Create a resource monitor
CREATE RESOURCE MONITOR monthly_budget
  WITH CREDIT_QUOTA = 500
  FREQUENCY = MONTHLY
  START_TIMESTAMP = IMMEDIATELY
  TRIGGERS
    ON 75 PERCENT DO NOTIFY
    ON 90 PERCENT DO SUSPEND
    ON 100 PERCENT DO SUSPEND_IMMEDIATE;

-- Apply the resource monitor to a Warehouse
ALTER WAREHOUSE analytics_wh
  SET RESOURCE_MONITOR = monthly_budget;

Cost Analysis with WAREHOUSE_METERING_HISTORY

-- Credit consumption per Warehouse over the last 30 days
SELECT
  warehouse_name,
  SUM(credits_used)         AS total_credits,
  SUM(credits_used_compute) AS compute_credits,
  SUM(credits_used_cloud_services) AS cs_credits
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
WHERE start_time >= DATEADD(DAY, -30, CURRENT_TIMESTAMP())
GROUP BY warehouse_name
ORDER BY total_credits DESC;

Diagnosing Query Performance

  • Check for spilling: if Query Profile shows Bytes Spilled to Local/Remote Storage, consider scaling up the Warehouse size
  • Check for queuing: if queued_provisioning_time or queued_overload_time in QUERY_HISTORY is high, consider enabling Multi-cluster or raising the cluster count
  • Leverage caches: repeated queries on the same Warehouse benefit from the Warehouse Cache and Result Cache

Check Your Understanding

Virtual Warehouse

問題 1

100 analysts are running queries concurrently from a BI dashboard, and queuing is happening frequently. Each query is lightweight, and increasing the Warehouse size does not relieve the queuing. Which is the most appropriate response?

  1. Increase the Warehouse size to 6XL to speed up individual queries
  2. Increase MAX_CLUSTER_COUNT on the Multi-cluster Warehouse to scale out
  3. Set Auto-suspend to 0 seconds so the Warehouse stays always-on
  4. Extend the Result Cache TTL to reduce the number of query executions

正解: B

Queuing happens when concurrent query volume exceeds the Warehouse's capacity. When each query is lightweight and scaling up doesn't help, raising MAX_CLUSTER_COUNT on the Multi-cluster Warehouse scales out the cluster count, increasing the number of queries that can run simultaneously and clearing the queue. AUTO_SUSPEND = 0 does not mean 'never suspend' — it means 'suspend immediately when idle.' Result Cache helps with repeated identical queries but does not relieve queuing across different queries.

Frequently Asked Questions

Does resizing a Virtual Warehouse cause any downtime?

No, resizing a Virtual Warehouse incurs no downtime. ALTER WAREHOUSE SET WAREHOUSE_SIZE takes effect immediately. If queries are already running, the new size applies to subsequent queries (you can control this with the WAIT_FOR_COMPLETION option). The Warehouse Cache (local disk cache) is preserved during a resize, but newly added nodes start with an empty cache, so you may see more cache misses for the first few queries after resizing.

When should I choose Standard vs. Economy scaling policy on a Multi-cluster Warehouse?

The Standard policy adds clusters as soon as queries start queuing, prioritizing performance. It suits latency-sensitive workloads like interactive dashboards. The Economy policy delays adding clusters until existing ones are fully utilized, prioritizing cost. It suits workloads such as batch processing where some queuing is acceptable.

What happens if I set Auto-suspend to 0 seconds?

AUTO_SUSPEND = 0 does not mean the Warehouse never auto-suspends; it means it suspends immediately the moment it goes idle. In other words, suspension starts the instant a query finishes. Because the minimum billing unit is 60 seconds, if another query arrives within that window the Warehouse resumes and you are billed for another full 60 seconds. For intermittent query patterns, 60-300 seconds is usually more cost-efficient.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Snowflake

Snowflake Certifications: All 11 Exams Explained (2026)

Every SnowPro certification — Associate, Core, Specialty, Ad...

Snowflake

Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)

All 11 SnowPro exams ranked by difficulty with study-time es...

Snowflake

Snowflake Study Guide: Fastest Pass Route by Exam (2026)

How to pass SnowPro certifications efficiently — official ma...

Snowflake

SnowPro Core (COF-C03): Complete Exam Guide (2026)

Pass the SnowPro Core exam — six domains, scope, sample ques...

Snowflake

SnowPro Associate Platform (SOL-C01): Complete Guide (2026)

The entry-level SnowPro Associate exam — scope, weighting, s...

Browse all Snowflake articles (103)
© 2026 NicheeLab All rights reserved.