Snowflake Syntax: Create a Virtual Warehouse

After 30 years of experience building multi-terabyte data warehouse systems, I spent five years at Snowflake as a Senior Solution Architect, helping customers across Europe and the Middle East deliver lightning-fast insights from their data.
In 2023, he joined Altimate.AI, which uses generative artificial intelligence to provide Snowflake performance and cost optimization insights and maximize customer return on investment.
Certifications include Snowflake Data Superhero, Snowflake Subject Matter Expert, SnowPro Core, and SnowPro Advanced Architect.
Create Warehouse
What does it do?
Used to create a Virtual Warehouse which can be used to execute queries.
Required Privileges
Your current role needs to have the following privileges:
CREATE WAREHOUSE
Related Pages
- show warehouses
CREATE WAREHOUSE
Creates a Virtual Warehouse with a sensible set of parameters. See below for notes.
create or replace warehouse sales_data_loading_wh with
warehouse_size = SMALL
auto_resume = true
initially_suspended = true
min_cluster_count = 1
max_cluster_count = 1
auto_suspend = 60
comment = 'Sales warehouse purely for Data Loading using COPY'
statement_timeout_in_seconds = 28800;

The above command creates a warehouse with the following parameters:
| Parameter | Recommended Value | Description | Comments | |
| warehouse_size | SMALL | Indicates the size of the warehouse. | Larger warehouses can process larger data volumes more quickly but may cost more. | |
| auto_resume | true | Indicates whether the warehouse should automatically resume when a query is submitted. | If this value is set to FALSE, you must execute an ALTER WAREHOUSE RESUME command before executing a query. This would be very unusual. | |
| initially_suspended | true | Indicates the warehouse should be created but not immediately started. | This is a sensible default unless the warehouse needs to execute queries immediately. | |
| min_cluster_count | 1 | Defines the number of clusters (sets of machines) to deploy initially. | In around 99.9% of cases, leave this as one to avoid a significant increase in cost. | |
| max_cluster_count | 1 | Defines how many clusters may be created to cope with increasing users executing concurrent queries. | Unless you expect many concurrent queries on the warehouse, leave this as 1. | |
| auto_suspend | 60 | The number of idle time seconds to wait before suspending the warehouse. | Sixty seconds is a best practice setting in about 99% of cases. | |
| comment | Warehouse Purpose | Documents why this warehouse was built | It should be mandatory for every warehouse | |
| statement timeout in seconds | 28800 | The number of seconds a query can execute before being automatically terminated. | The default is 3 days. This setting allows each query to run for 8 hours and avoids runaway queries. |
Further Information
Snowflake Documentation
Snowflake Documentation: Create a Warehouse







