User guide

SQL warehouses

Creating the compute that answers SQL, sizing it so it scales with load and stops when nobody is using it, and reading what it costs.

A SQL warehouse is a pool of workers that answers SQL queries, powered by Trino™. SQL notebooks, dashboards and the %%trino command in kernel notebooks all run on one. It grows and shrinks with load, and stops when nothing has queried it for a while.

Creating a warehouse

Open Warehouses under Compute and choose New warehouse. Owners, admins and members can create and run warehouses.

FieldWhat it does
Name, DescriptionHow people recognise it.
Worker sizeThe compute profile each worker runs as, which sets how big a worker is. Only profiles your role or group may use are listed — a warehouse reads the catalog as its profile, so choosing one is choosing what it can read.
Min workersThe floor while running; 1 by default. 0 scales to nothing while idle: cheaper, but the first query afterwards waits for a worker to start.
Max workersThe ceiling, and so the cost ceiling; 4 by default. Your plan may set a maximum, shown under the field.
Scale-down grace (seconds)How long to hold the current size after load drops; 300 by default.
Idle timeout (seconds)How long with no queries at all before the warehouse stops; 1800 by default. 0 means it never stops for being idle.

Your organisation limits how many warehouses can run at once. The Warehouses page shows how many are running, the limit, and this month's cost.

How it scales and stops

Scale-down and the idle timeout are separate. Scale-down releases workers when load drops but keeps the warehouse running. The idle timeout stops it entirely when nothing is querying it. A warehouse can shrink without stopping, and stop without ever having shrunk.

States

StateMeans
RunningAnswering queries.
Starting, Scaling, StoppingChanging size or state.
StoppedNo workers and no cost. The page says why: stopped by someone, stopped after being idle, stopped because the organisation is over its limit, or stopped after an error.
ErrorSomething failed. The page shows what, what to do about it, and a reference to quote if you need help.

The warehouse page

  • Start, Stop, Settings and Delete.
  • Workers now against the ceiling, this month's cost, and — while running — how long until it stops for being idle.
  • Resize to changes the worker size.
  • Recent usage lists each metered interval: workers, worker-seconds and cost.

The Cost page lists usage across every warehouse, for anyone sizing one to see what it costs before they do.

Using a warehouse

  • SQL notebooks send their queries to the most recently started warehouse that is running. The notebook's Engine button names it. See The notebook editor.
  • Dashboards read through a warehouse. See SQL and dashboards.
  • Kernel notebooks reach it with %%trino. See Kernels.

What a warehouse lets you read is decided per person: your own grants apply, and column masks and row filters are enforced on every query.