Module 02 · Lesson 5 of 9Detailed study · about 20 min

Auto-suspend and auto-resume through a small lab

Auto-suspend stops idle warehouse compute. Auto-resume starts it when required work arrives.

Understand the idea

A warehouse lifecycle describes when compute starts, performs work and stops. A running warehouse has compute available. A suspended warehouse has stopped that compute; its associated business tables are not deleted.

Key ideas in simple English
ConceptWhat it means
AUTO_SUSPENDConfigured idle interval in seconds; observed shutdown depends on monitoring and active work.
AUTO_RESUMEAllows required work to resume the selected suspended warehouse.
INITIALLY_SUSPENDEDCreates the lab warehouse without starting compute.
Trade-offShort idle intervals can increase restarts and reduce local cache reuse.

A concrete example

Set AUTO_SUSPEND = 60 and AUTO_RESUME = TRUE in the isolated lab. Observe query execution, idle time and suspension.

Remember: A cached result may avoid warehouse execution. The optional lab controls that setting explicitly.

Explain it step by step · full theory

First, understand the meaning

A warehouse lifecycle describes when compute starts, performs work and stops. A running warehouse has compute available. A suspended warehouse has stopped that compute; its associated business tables are not deleted.

Scaling means changing capacity. Scaling up gives a warehouse more capacity per cluster. Scaling out adds capacity for concurrent requests through supported configurations such as multi-cluster warehouses.

Picture it in everyday life

Think of a shop’s checkout area. Giving one checkout more capable equipment is like scaling up. Opening more checkouts for many waiting customers is like scaling out. Closing the checkouts at night is like suspension; it does not remove the stock from the shop.

Why do we need this?

A business may have occasional analysis, steady dashboards and busy morning periods. Keeping the same resources active all the time may not suit every workload.

The team needs two separate decisions: when should compute be available, and how much capacity should be available when work arrives? Those decisions affect response times and usage.

Let us follow it step by step

Follow an occasional reporting warehouse.

  1. Work arrives and the warehouse must be available or resume.
  2. The warehouse executes the report.
  3. After work finishes, it may remain idle for a period.
  4. Auto-suspend can stop it after configured inactivity.
  5. When later work requires it, auto-resume can restart resources if enabled and permitted.

Choose from the symptom

Choose from the symptom
SituationInvestigateDo not assume
One query is expensive while little else runsQuery work and suitable warehouse sizeExtra clusters will jointly accelerate it
Many quick queries wait togetherConcurrency and available capacityEvery query must need a larger size
Long idle periodsAvailability needs and suspension settingsSuspension removes storage costs
Report is missing new recordsPipeline freshnessA scaling change will create missing data

What changes when a warehouse resumes?

Provisioning can take time, and local warehouse data cache is lost on suspension. A resumed warehouse may need to read inputs again. A setting that is suitable for once-a-day work may not suit a frequently used dashboard.

Multi-cluster availability depends on edition and configuration. More capacity has usage implications, and no size guarantees a particular speed-up. Storage and other services can still incur charges while a warehouse is suspended.

Before you move on

Lifecycle controls when compute is active. Scale-up and scale-out address different capacity needs. Ask whether the problem is one demanding task, simultaneous demand or idle resources before changing settings.

Create a deliberate learning warehouse

The following example requires a role with CREATE WAREHOUSE on the account. Use a fresh lab name. The role that creates the object owns it. A separate learner role needs suitable USAGE privileges, and manual suspend/resume requires the applicable OPERATE privilege.

INITIALLY_SUSPENDED avoids starting compute during creation. AUTO_SUSPEND = 60 requests suspension after the configured idle interval. AUTO_RESUME allows a warehouse-requiring statement to start the selected suspended warehouse. Monitoring occurs on a schedule, so the observed idle shutdown time need not equal exactly 60 seconds.

Observe each transition

Select LEVEL1_WH and run the small aggregation. Inspect SHOW WAREHOUSES and query history around that execution. After the work ends, observe the warehouse becoming idle and then suspended. A later query that actually needs compute can trigger another resume.

A session-information query or an eligible reused result may not require warehouse execution. For this controlled lab, USE_CACHED_RESULT = FALSE avoids persisted-result reuse. Restore it to TRUE afterward. Small sample data illustrates the lifecycle and is unsuitable for performance benchmarking.

Choose the idle interval from the workload

A dashboard request every few seconds and a daily report have different idle gaps. An aggressive suspend policy can introduce repeated starts and reduce local cache reuse. A long idle interval can keep resources running with no work.

Compare total active time, user wait and restart behavior for the intended workload. Auto-suspend is one input to cost management, while serverless services and retained storage have separate consumption.

Words used in this lesson
Suspend
Stop a warehouse’s compute resources.
Resume
Make warehouse compute available again.
Scale up
Increase processing capacity per cluster.
Scale out
Add capacity for concurrent work where supported.

See how it works

Choose a step to explore the idea at your own pace.

Open the interactive explanation
Interactive explainer1 / 3

Auto-suspend and auto-resume through a small lab

Request
Provision or resume
Run work

Start

Work needs compute, so the warehouse becomes available.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start

    Work needs compute, so the warehouse becomes available.

  2. Stop

    After appropriate inactivity, suspension stops compute while tables remain.

  3. Choose capacity

    One demanding task and many simultaneous tasks call for different investigations.

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.
Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.

Optional isolated warehouse lifecycle exercise

SQL · example
CREATE WAREHOUSE LEVEL1_WH
  WAREHOUSE_SIZE = 'XSMALL'
  AUTO_SUSPEND = 60
  AUTO_RESUME = TRUE
  INITIALLY_SUSPENDED = TRUE;

USE WAREHOUSE LEVEL1_WH;
ALTER SESSION SET USE_CACHED_RESULT = FALSE;
SELECT SUM(column1) AS total
FROM VALUES (100), (40);
SHOW WAREHOUSES LIKE 'LEVEL1_WH';
ALTER SESSION SET USE_CACHED_RESULT = TRUE;

What to expect and why

Expected logical result for SUM is 140. Inspect the actual warehouse state in the subsequent output or UI. Creating the lab requires account-level permission and execution consumes compute. If the object already exists, inspect it rather than replacing it.

Expected result for the supplied input (not live output)
TOTAL
140

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

Many short queries wait at the same time. Which question should you investigate first?

Try it yourself

Compare a report queried once a day with one queried every few seconds. Explain why their suspend choices may differ.

Compare your reasoning

The daily workload may tolerate resume time and benefit from long suspended periods. Frequent reporting may value immediate availability and useful local cache. Consider usage and latency rather than using one fixed setting.

Official sources and curriculum

Module 02 · See module scope