Skip to content
PHP2Shell: The PHP Bug
Akshay Thakare

Snowflake Virtual Warehouses and Cost Control

Storage and compute are separate: how warehouses are billed, when to scale up vs out, and the settings that stop a surprise bill.

SnowflakeBeginner2 min readUpdated 11 Oct 2026

Storage and compute are separate

  • Storage holds your tables and is billed per TB per month.
  • A virtual warehouse is a compute cluster that runs queries. It is billed in credits per second while running (minimum 60 seconds each time it starts).

Many warehouses can read the same data at the same time without blocking each other.

Sizes

Each size up (XS → S → M → L …) doubles the compute and the credits per hour. A query that is CPU-bound often runs about twice as fast on the next size, so it can cost roughly the same while finishing sooner.

Scale up or scale out?

SymptomAction
One big query is slowScale up (larger size)
Many users queue at the same timeScale out (multi-cluster warehouse)
Queries spill to local or remote storageScale up: the working set does not fit in memory

Settings that save money

SQL.sql
CREATE WAREHOUSE etl_wh
  WAREHOUSE_SIZE = 'SMALL'
  AUTO_SUSPEND = 60          -- seconds idle before stopping
  AUTO_RESUME = TRUE
  INITIALLY_SUSPENDED = TRUE;
 
CREATE RESOURCE MONITOR monthly_cap WITH CREDIT_QUOTA = 100
  TRIGGERS ON 90 PERCENT DO NOTIFY ON 100 PERCENT DO SUSPEND;
ALTER WAREHOUSE etl_wh SET RESOURCE_MONITOR = monthly_cap;
  • Separate warehouses per workload (ELT, BI, data science), so you can see and cap each one.
  • Watch QUERY_HISTORY for queries with large bytes scanned or spilling.

Finished this note?

Share