Database / Snowflake Interview Questions
What is a Virtual Warehouse in Snowflake and how does it scale independently of storage?
A Virtual Warehouse is a named MPP compute cluster in Snowflake that executes SQL queries, loads data, and performs DML operations. Unlike traditional databases where compute and storage share the same physical nodes, a Virtual Warehouse borrows cloud compute on demand and reads data directly from the shared cloud object storage layer — no data is moved when a warehouse starts, resizes, or suspends.
Warehouses scale in two dimensions. Scale up (resize to a larger T-shirt size) gives more memory and CPU per query — useful for complex aggregations, large sorts, or multi-table joins. Sizes double credits per hour: X-Small=1 credit, Small=2, Medium=4, Large=8, X-Large=16, 2X-Large=32, 3X-Large=64, 4X-Large=128. Scale out (multi-cluster warehouses, Enterprise+) adds parallel clusters to handle concurrent user workloads. Resizing is near-instant and affects only compute — the storage layer is completely untouched.
Auto-suspend stops billing when idle (configurable from 60s to 30m). Auto-resume brings the warehouse back on the next query in 1-2 seconds. Together they make pay-per-second compute practical for real workloads.
CREATE WAREHOUSE etl_wh
WAREHOUSE_SIZE = 'X-LARGE'
AUTO_SUSPEND = 60
AUTO_RESUME = TRUE;
-- Resize without any data movement
ALTER WAREHOUSE etl_wh SET WAREHOUSE_SIZE = '2X-LARGE';
-- Suspend manually; billing stops immediately
ALTER WAREHOUSE etl_wh SUSPEND;
More Related questions...