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;
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
