Skip to main content

ALTER WAREHOUSE

Introduced or updated: v1.2.687

Suspends, resumes, or modifies settings of an existing warehouse.

Syntax

-- Suspend or resume a warehouse
ALTER WAREHOUSE <warehouse_name> { SUSPEND | RESUME }

-- Modify warehouse settings
ALTER WAREHOUSE <warehouse_name>
SET [ WITH ] warehouse_size = <size>
[ WITH ] auto_suspend = <nullable_unsigned_number>
[ WITH ] auto_resume = <bool>
[ WITH ] max_cluster_count = <nullable_unsigned_number>
[ WITH ] min_cluster_count = <nullable_unsigned_number>
[ WITH ] comment = '<string_literal>'
ParameterDescription
SUSPENDImmediately suspends the warehouse.
RESUMEImmediately resumes the warehouse.
SETModifies one or more warehouse options. Unspecified fields remain unchanged.

Options

The SET clause accepts the same options as CREATE WAREHOUSE:

OptionType / ValuesDescription
WAREHOUSE_SIZEXSmall, Small, Medium, Large, XLarge, 2XLarge6XLargeChanges compute size.
AUTO_SUSPENDNULL, 0, or ≥300 secondsIdle timeout before automatic suspend. NULL disables auto-suspend.
AUTO_RESUMEBooleanControls whether incoming queries wake the warehouse automatically.
MAX_CLUSTER_COUNTNULL or non-negative integerUpper bound for auto-scaling clusters.
MIN_CLUSTER_COUNTNULL or non-negative integerLower bound for auto-scaling clusters.
COMMENTStringFree-form text description.
  • NULL is valid for numeric options to reset them to 0.
  • Supplying SET with no options raises an error.

Examples

Suspend a warehouse:

ALTER WAREHOUSE my_wh SUSPEND;

Resume a warehouse:

ALTER WAREHOUSE my_wh RESUME;

Modify warehouse settings:

ALTER WAREHOUSE my_wh
SET warehouse_size = Large
auto_resume = TRUE
comment = 'Serving tier';

Disable auto-suspend:

ALTER WAREHOUSE my_wh SET auto_suspend = NULL;
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today