Snowflake Data Cloud
Module 01 • The "Cluster"

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.

~45 min Cost calculator Concurrency simulator
01

Cluster implementation: the components and what they do

Follow one query from your laptop to the data and back.
Client Snowsight, JDBC, Python, dbt, BI CLOUD SERVICES LAYER (always on, multi-tenant, managed by Snowflake) Auth & RBACwho are you? Parser & Optimizerplan + pruning Metadata Storemin/max per column TransactionsACID, versions Result Cache24 h reuse COMPUTE LAYER: VIRTUAL WAREHOUSES (yours, isolated, billed per second) ETL_WH (Large) nodes: CPU + RAM + local SSD loads & transforms BI_WH (Medium, 1–4 clusters) auto-scales for dashboards no impact on ETL Serverless compute Snowpipe, auto-clustering, serverless tasks (Snowflake-run) STORAGE LAYER (S3 / Azure Blob / GCS, owned and encrypted by Snowflake) Immutable, compressed, columnar micro-partitions One copy of the data, read by every warehouse at the same time
A query goes through Cloud Services first (auth, plan, prune). Only then does a warehouse read the micro-partitions it needs. Results can come straight back from the result cache without any warehouse running.
ComponentWhat it doesWho manages / pays
Cloud ServicesAuthentication, 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 warehouseOne 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 warehouseThe 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 warehouseSame 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 featuresSnowpipe, automatic clustering, search optimization, materialized view refresh, serverless tasks, replication.Snowflake sizes the compute. Billed per use, separately from your warehouses.
StorageMicro-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.
Why "cluster" is a slightly misleading word here

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.

02

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.

SizeCredits / hourCredits / secondTypical use
X-Small10.0003Learning, small dev, light BI
Small20.0006Small ELT, team analytics
Medium40.0011Typical dashboards, medium transforms
Large80.0022Heavy joins, large daily loads
X-Large160.0044Big backfills, TB-scale scans
2X-Large … 6X-Large32 … 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

Scale UP (bigger size)

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.

Scale OUT (more clusters)

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

SettingBehaviour
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.
Concurrency simulator: scale out
Drag the number of concurrent queries and watch clusters start and queues form. This is a simplified model in which each cluster runs about 8 queries at a time.
SCALING_POLICY
Clusters running
3
Running queries
20
Queued queries
0
Credits / hour
12
Queue

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;
03

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_SUSPEND is in seconds. A warehouse created with SQL defaults to 600 (10 minutes). 0 or NULL means 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 / dbt60. Jobs run back to back, so suspend right after.
Ad-hoc analysts60–300
BI dashboards hitting the same tables300–600 to keep the SSD cache warm between refreshes.
Data loading with SnowpipeN/A. Snowpipe is serverless and does not use your warehouse.
Auto-suspend cost calculator
Model a day of query bursts spread evenly across a working window. Blue is time spent running queries. Amber is idle time you still pay for while waiting for auto-suspend.
A burst is a group of queries back to back, such as a dashboard refresh or a dbt run.
AUTO_SUSPEND
Billed hours / day
–
Credits / day
–
$ / month (30 d)
–
Idle share of bill
–
One day, midnight to midnight
running queries idle but billed suspended (free)
04

Why is Snowflake preferred over other databases?

A balanced answer wins interviews. Know the strengths and where it is the wrong tool.
Storage and compute are separate

Scale each independently. ETL, BI and data science each get their own warehouse on the same data with no resource fights.

Near-zero administration

No indexes, vacuum, distribution keys, patching or capacity planning. Statistics and storage optimisation are automatic.

Elastic in seconds

Resize or add clusters with one SQL statement. Pay per second and suspend to zero when idle.

Semi-structured data is first class

Store JSON, Avro and Parquet in VARIANT columns and query them with SQL dot notation and FLATTEN.

Time Travel and zero-copy cloning

Restore a dropped table in seconds. Clone a 10 TB production database for testing instantly and with no extra storage at first.

Secure data sharing

Share live tables with other accounts without copying files. It is the basis of Snowflake Marketplace.

Compared withSnowflake advantageWhere the other wins
Oracle / SQL Server / Postgres (OLTP)Analytics on TB–PB data, elastic compute, no DBA tuningMillisecond 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-cloudDeep AWS integration, predictable reserved pricing (Redshift Serverless narrows the gap)
Google BigQueryMulti-cloud, explicit control of compute size, cost predictable per warehousePure serverless with no warehouse to size, and tight GCP integration
DatabricksSimpler SQL-first experience, less engineering to operate, strong governance and sharingHeavy Spark/ML engineering, notebooks, open-format lakehouse control
When not to use Snowflake

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.

05

Interview check: warehouses

Try answering out loud before you expand each question. The full bank has more.