Warehouses & Compute
In Snowflake you never install or patch a cluster. You only decide how much compute to run, when to run it, and who shares it. This module explains the parts that make up a Snowflake "cluster", the SQL you will use every day, and how auto-suspend decides your bill.
Cluster implementation: the components and what they do
Follow one query from your laptop to the data and back.| Component | What it does | Who manages / pays |
|---|---|---|
| Cloud Services | Authentication, access control, SQL parsing, optimization, metadata (min/max, row counts), transactions and the result cache. A SELECT COUNT(*) or MIN(col) on a table can be answered from metadata alone. | Snowflake. Billed only for the part above 10% of that day's warehouse credits. |
| Virtual warehouse | One or more compute clusters made of nodes. Each node has CPU, memory and local SSD that caches remote data. It executes scans, joins, aggregations and DML. | You choose size and settings. Billed in credits per second while running. |
| Multi-cluster warehouse | The same warehouse with 1–10 identical clusters behind it (higher limits are available on request). Extra clusters absorb concurrency, not bigger queries. | You set min/max. Each running cluster is billed. Enterprise edition or higher. |
| Snowpark-optimized warehouse | Same idea, with much more memory per node for ML training, large UDFs and memory-hungry Python. | You. Costs more credits per hour than a standard warehouse of the same size. |
| Serverless features | Snowpipe, automatic clustering, search optimization, materialized view refresh, serverless tasks, replication. | Snowflake sizes the compute. Billed per use, separately from your warehouses. |
| Storage | Micro-partitions in the cloud provider's object storage, replicated across availability zones by the provider. | Snowflake runs it. Billed per compressed TB per month, including Time Travel and Fail-safe bytes. |
In Spark or Redshift a cluster stores data and computes on it. In Snowflake a warehouse stores nothing permanently. Dropping a warehouse loses no data, and you can create ten warehouses that read the same table at once. Data loss only happens when you drop the table itself, and even that can be undone with UNDROP.
Core warehouse operations
The eight statements you will run most often, plus the parameters that matter.-- 1. Create (sizes: XSMALL, SMALL, MEDIUM, LARGE, XLARGE, XXLARGE ... X6LARGE) CREATE WAREHOUSE IF NOT EXISTS etl_wh WAREHOUSE_SIZE = 'SMALL' AUTO_SUSPEND = 60 -- seconds idle before it suspends AUTO_RESUME = TRUE -- wake up when a query arrives INITIALLY_SUSPENDED = TRUE -- don't start billing at creation COMMENT = 'Nightly loads and dbt runs'; -- 2. Point your session at it USE WAREHOUSE etl_wh; -- 3. Scale UP for a heavy job (running queries finish on the old size) ALTER WAREHOUSE etl_wh SET WAREHOUSE_SIZE = 'LARGE'; -- 4. Scale OUT for many users (Enterprise+): a multi-cluster warehouse ALTER WAREHOUSE etl_wh SET MIN_CLUSTER_COUNT = 1 MAX_CLUSTER_COUNT = 4 SCALING_POLICY = 'STANDARD'; -- or 'ECONOMY' -- 5. Manual suspend / resume ALTER WAREHOUSE etl_wh SUSPEND; ALTER WAREHOUSE etl_wh RESUME IF SUSPENDED; -- 6. Guard rails ALTER WAREHOUSE etl_wh SET STATEMENT_TIMEOUT_IN_SECONDS = 3600 -- kill runaway queries STATEMENT_QUEUED_TIMEOUT_IN_SECONDS = 600; -- don't queue forever -- 7. Inspect SHOW WAREHOUSES LIKE 'ETL%'; -- 8. Who spent what (ACCOUNT_USAGE lags by up to ~3 hours) SELECT warehouse_name, SUM(credits_used) AS credits FROM snowflake.account_usage.warehouse_metering_history WHERE start_time >= DATEADD(day, -7, CURRENT_TIMESTAMP()) GROUP BY 1 ORDER BY 2 DESC;
Sizes and credits
Every size up doubles both the compute and the credits per hour. A query that parallelises well finishes in roughly half the time at twice the rate, so it costs about the same and you get the answer sooner. That is why "scale up for big jobs" is usually free in practice.
| Size | Credits / hour | Credits / second | Typical use |
|---|---|---|---|
| X-Small | 1 | 0.0003 | Learning, small dev, light BI |
| Small | 2 | 0.0006 | Small ELT, team analytics |
| Medium | 4 | 0.0011 | Typical dashboards, medium transforms |
| Large | 8 | 0.0022 | Heavy joins, large daily loads |
| X-Large | 16 | 0.0044 | Big backfills, TB-scale scans |
| 2X-Large … 6X-Large | 32 … 512 | — | Rare: very large one-off jobs |
These are the standard warehouse rates. Snowpark-optimized and newer-generation standard warehouses (Gen2) use different multipliers. Your dollar price per credit depends on edition, cloud and region (roughly $2–$4 on demand).
Scale up vs scale out: the #1 interview question
Fixes: one query that is slow because it is big. Signs are large scans, big joins, or spilling to disk.
How: ALTER WAREHOUSE … SET WAREHOUSE_SIZE. Takes effect for new queries.
Won't fix: 40 users queuing behind each other.
Fixes: many concurrent queries waiting in the queue, such as 9 a.m. dashboard refreshes.
How: MIN/MAX_CLUSTER_COUNT on a multi-cluster warehouse.
Won't fix: a single slow query, because one query runs on one cluster.
Multi-cluster modes and scaling policies
| Setting | Behaviour |
|---|---|
| Maximized mode (min = max > 1) | All clusters start whenever the warehouse runs. Use it for predictable, constant high concurrency. |
| Auto-scale mode (min < max) | Snowflake adds and removes clusters as load changes. This is the usual choice. |
SCALING_POLICY = 'STANDARD' | Favours performance. Starts a cluster as soon as a query queues, staggering new clusters about 20 s apart. Removes a cluster after 2–3 consecutive one-minute checks show its load fits on the others. |
SCALING_POLICY = 'ECONOMY' | Favours credits. Only starts a cluster if it estimates there is at least ~6 minutes of work for it, and removes it after 5–6 checks. Some queuing is accepted. |
MAX_CONCURRENCY_LEVEL (default 8) | Roughly how many queries one cluster runs at once before new ones queue. It is a target, not a hard count, because heavy queries take more slots. |
Resource monitors: the spending brake
A resource monitor counts credits for one or more warehouses, or for the whole account, and acts at thresholds. SUSPEND lets running queries finish. SUSPEND_IMMEDIATE cancels them. Resource monitors do not cover serverless features such as Snowpipe or automatic clustering. Use budgets for those.
CREATE RESOURCE MONITOR bi_monthly WITH
CREDIT_QUOTA = 300 FREQUENCY = MONTHLY START_TIMESTAMP = IMMEDIATELY
TRIGGERS ON 75 PERCENT DO NOTIFY
ON 100 PERCENT DO SUSPEND
ON 110 PERCENT DO SUSPEND_IMMEDIATE;
ALTER WAREHOUSE bi_wh SET RESOURCE_MONITOR = bi_monthly;
Suspend / resume settings and how billing really works
The rules
- Billing is per second, with a 60-second minimum each time the warehouse starts or resumes.
AUTO_SUSPENDis in seconds. A warehouse created with SQL defaults to 600 (10 minutes).0orNULLmeans never, which you should avoid.AUTO_RESUME = TRUE(the default) wakes the warehouse when a query arrives. Resuming usually takes a few seconds.- Resizing a running warehouse bills the new size from the moment the extra compute is provisioned. Resizing a suspended one costs nothing until it resumes.
- Suspending drops the local SSD cache, so the first queries after resume read from remote storage and run slower.
Recommended AUTO_SUSPEND by workload
| Scheduled ETL / dbt | 60. Jobs run back to back, so suspend right after. |
| Ad-hoc analysts | 60–300 |
| BI dashboards hitting the same tables | 300–600 to keep the SSD cache warm between refreshes. |
| Data loading with Snowpipe | N/A. Snowpipe is serverless and does not use your warehouse. |
Why is Snowflake preferred over other databases?
A balanced answer wins interviews. Know the strengths and where it is the wrong tool.Scale each independently. ETL, BI and data science each get their own warehouse on the same data with no resource fights.
No indexes, vacuum, distribution keys, patching or capacity planning. Statistics and storage optimisation are automatic.
Resize or add clusters with one SQL statement. Pay per second and suspend to zero when idle.
Store JSON, Avro and Parquet in VARIANT columns and query them with SQL dot notation and FLATTEN.
Restore a dropped table in seconds. Clone a 10 TB production database for testing instantly and with no extra storage at first.
Share live tables with other accounts without copying files. It is the basis of Snowflake Marketplace.
| Compared with | Snowflake advantage | Where the other wins |
|---|---|---|
| Oracle / SQL Server / Postgres (OLTP) | Analytics on TB–PB data, elastic compute, no DBA tuning | Millisecond single-row reads and writes, enforced constraints, high-frequency transactions |
| Amazon Redshift (provisioned) | No distribution or sort key design, no VACUUM, true workload isolation, cross-cloud | Deep AWS integration, predictable reserved pricing (Redshift Serverless narrows the gap) |
| Google BigQuery | Multi-cloud, explicit control of compute size, cost predictable per warehouse | Pure serverless with no warehouse to size, and tight GCP integration |
| Databricks | Simpler SQL-first experience, less engineering to operate, strong governance and sharing | Heavy Spark/ML engineering, notebooks, open-format lakehouse control |
As the system of record for an app that does thousands of single-row updates per second (use Postgres, or Snowflake Hybrid Tables for moderate cases). For sub-10 ms API lookups. For workloads that are almost always running at full load, where reserved capacity elsewhere can be cheaper.