CertSafari
    Databricks Certified Data Analyst Associate· Lessons

    Domain 4 · Lesson 10/39

    SQL warehouses: the compute that runs Databricks SQL queries

    Explain the role a SQL Warehouse plays in query execution.

    15 min read
    2.22% of exam
    6 sources
    Published 22 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Explain why every query in the SQL editor, Catalog Explorer and dashboards needs a SQL warehouse selected before it can run
    • Predict what happens when a query, job, BI connection or dashboard reaches a stopped warehouse, and when an idle warehouse auto-stops
    • Choose between serverless, pro and classic warehouses based on engine features, startup time and networking needs
    • Describe how a warehouse admits, queues and scales for concurrent queries, and tell a cluster-size problem from a cluster-count problem

    Key concept

    SQL warehouse — The compute resource that actually executes Databricks SQL statements. Writing a query costs nothing and runs nothing; only a running warehouse turns the SQL text into results, so every interface that runs SQL needs one to target.

    1.Every Databricks SQL query runs on a warehouse

    A SQL warehouse is the compute that processes a query and returns its rows. Databricks SQL keeps the query (a saved, versioned SQL statement) apart from the engine that runs it. Saving a query, opening it, or pointing a dashboard at it uses no compute. Clicking Run sends the statement to a warehouse, and that warehouse reads the tables, does the joins and aggregations, and sends the results back to the editor. This holds for every Databricks SQL interface: the SQL editor, dashboards, alerts, scheduled jobs and Genie Agents all hand their SQL to a warehouse.

    That is why the SQL editor has a compute dropdown at the top. It lists the warehouses you have permission to use, and a query has nowhere to run until one is selected. The same dropdown shows up anywhere the workspace runs SQL on your behalf. Catalog Explorer uses a warehouse to preview a table's sample data, and each dashboard dataset runs on a warehouse too (see building AI/BI dashboards). The SQL Warehouses page in the sidebar lists every warehouse you can access, with running ones first, so you can tell which are up before you pick one.

    The dropdown selects compute, not data. A warehouse is not a notebook cluster that your SQL gets quietly converted into cells for. It also isn't the place where you choose a metastore or a table version. Unity Catalog governs what a warehouse may read, and administrators set that on the warehouse: when Unity Catalog is enabled for the workspace, it is the default for every new warehouse. A notebook can go the other way and attach to a pro or serverless warehouse to run its SQL there. A query from the SQL editor, though, runs directly on the warehouse.

    Most analysts use warehouses but don't build them. Creating a warehouse takes workspace-admin rights or unrestricted cluster-creation permission. Every new workspace includes a small, editable Starter Warehouse so there's something to run on from day one. Older material may say SQL endpoint: SQL endpoints were renamed SQL warehouses in 2023, and the two terms mean the same compute.

    Checkpoint 1 of 7· Check yourself

    An analyst opens a saved query in the Databricks SQL editor. Before clicking Run, they must pick an entry from the dropdown at the top of the editor. What does that choice decide?

    Checkpoint 2 of 7· Exam question

    An analyst opens a saved query in the Databricks SQL editor and clicks Run, but nothing executes until they first choose an item from a dropdown menu at the top of the editor. What is that dropdown selecting, and why is it required before the query can run?

    Sources123

    2.Stopped warehouses, auto-restart and auto-stop

    A warehouse is either running or stopped, and a stopped warehouse wakes up when work arrives for it. If you run a query against a stopped warehouse you have access to, it starts automatically. You don't need to find an admin or open the warehouse page first. The query just waits while the compute starts up. Work coming from outside the editor triggers the same restart:

    A stopped warehouse auto-restarts when:

    • you try to run a query on it
    • a job assigned to it is scheduled to run
    • a JDBC/ODBC client, such as a BI tool, connects to it
    • someone opens a dashboard associated with it as the dashboard-level warehouse

    You can also start it by hand: click SQL Warehouses in the sidebar, then the start icon next to the warehouse. This needs at least CAN MONITOR permission on the warehouse. Most users can't create warehouses but can restart any warehouse they can connect to. Contact an administrator when you can't connect to any warehouse, when a stopped warehouse won't let you run queries, or when the warehouse runs but your tables aren't accessible.

    Auto Stop stops a warehouse after a set number of idle minutes, and it matters because idle compute still costs money. A warehouse that is running but has no queries keeps accruing DBU and cloud instance charges until it stops. The defaults and minimums depend on the warehouse type. Faster startup is what makes a short window workable: a serverless warehouse can stop after 10 idle minutes because restarting it takes seconds.

    Auto Stop defaults and minimums by warehouse type
    Warehouse typeDefault idle time before stoppingMinimum
    Pro and classic45 minutes10 minutes
    Serverless10 minutes5 minutes in the UI; as low as 1 minute when created through the SQL warehouses API

    Checkpoint 3 of 7· Check yourself

    Overnight, Auto Stop shut down the team's SQL warehouse. The next morning, an analyst who has access to that warehouse clicks Run on a query in the SQL editor with that warehouse selected. What happens?

    Sources13

    3.Serverless, pro and classic warehouse types

    Databricks SQL offers three warehouse types, and they differ in three ways: which performance features they support, how fast they start, and where the compute runs. Every type runs Photon, the vectorized query engine. Predictive IO, which speeds up selective scans, is available on pro and serverless. Intelligent Workload Management (IWM), which uses AI-driven prediction to size resources to demand, is available only on serverless. When serverless is enabled in your account, it is the default type for a new warehouse, and Databricks recommends it wherever it's available.

    How the three SQL warehouse types compare
    AspectServerlessProClassic
    PhotonYesYesYes
    Predictive IOYesYesNo
    Intelligent Workload ManagementYesNoNo
    Typical startup2 to 6 secondsAbout 4 minutesAbout 4 minutes
    Where the compute layer runsYour Databricks accountYour AWS accountYour AWS account
    Choose it whenBest startup, most efficient IO, highly variable demand, fast autoscalingServerless isn't available in the region, or custom networking is needed for federation or hybrid setupsInteractive data exploration at entry-level performance

    Startup time is where the types differ most for analysts. Picture a nightly dashboard refresh and the morning's first ad hoc query, both arriving after hours of idle time. On a serverless warehouse, each waits a few seconds for compute. On a pro or classic warehouse, each waits about four minutes, because those warehouses run on infrastructure in your own cloud account. Serverless also hands capacity management, patching and upgrades to Databricks. A classic warehouse really is Photon-accelerated and suits exploration, and a pro warehouse really does add Predictive IO and fit custom networks. Neither is a good choice when the requirement is a fast start after idle time.

    Pro is still the right answer in some cases. If serverless isn't offered in your region, pro gives the most features available. If your network is custom-defined and the warehouse has to reach databases in that network or on-premises (for federation or a hybrid architecture, for example), pro keeps the compute inside your own cloud account where that networking applies. Classic offers the fewest features and is meant for interactive exploration at entry-level performance.

    Checkpoint 4 of 7· Match them up

    Each SQL warehouse type has its own feature set and startup profile. Match each type to its description.

    Tap a term, then the definition that fits it.

    Checkpoint 5 of 7· Exam question

    A BI team wants their nightly dashboard refresh and analysts' ad hoc queries to start executing within a few seconds of being submitted, even after long idle periods, without anyone manually starting compute. Which SQL warehouse type should they choose to meet this requirement?

    Sources431

    4.How a warehouse admits, queues and scales queries

    Two settings decide how much work a warehouse can handle, and they solve different problems. Cluster size (2X-Small up to 5X-Large) sets the resources of a single cluster, meaning how much compute one query can draw on. Scaling sets the minimum and maximum number of clusters of that size, meaning how many queries can run side by side. Both default to one cluster. A bigger size makes a large, complex query faster. It doesn't add room for more users, and for simple, short queries a bigger size can even be slower because of the extra data shuffling.

    Admission works on a fixed ratio for pro and classic warehouses: each cluster takes about 10 concurrent queries, and Databricks recommends one cluster per 10 concurrent queries. Once every cluster is busy, new queries wait in a queue instead of failing. A queue can hold up to 1,000 queries on every warehouse type. The Peak Queued Queries metric on the warehouse's Monitoring tab shows whether this is happening, and a value that stays above 0 means the warehouse is short of capacity. A second signal tells you which kind. Queuing with no disk spill in the query profile is a concurrency problem: every cluster is full, so the warehouse needs more clusters. Spilling is a per-query signal instead. The query profile reports it as Bytes spilled to disk, meaning a query's working data overflowed onto disk, and it points at the resources of a single cluster. Because cluster size sets those resources, spill calls for a larger size, and adding clusters would not help (see query profiles and query insights).

    Pro and classic warehouses scale out within the minimum and maximum you set, based on an estimate of how long it would take to finish all running and queued queries. The table shows the rules. Two more rules apply: any query that waits in the queue for 5 minutes makes the warehouse scale up, and after 15 straight minutes of low load the warehouse scales back down. Since scaling up takes time, a team that expects a known burst, like a company-wide reporting hour, can raise the minimum cluster count so queries don't sit in the queue waiting for new clusters.

    Autoscaling rules for classic and pro warehouses
    Estimated time to process running and queued queriesClusters added
    2-6 minutes1
    6-12 minutes2
    12-22 minutes3
    Over 22 minutes3, plus 1 for every additional 15 minutes of load

    Serverless warehouses swap those static thresholds for Intelligent Workload Management. For each incoming query, IWM predicts how many resources it needs and checks the capacity available. The query starts right away if there's room and is queued if there isn't. IWM keeps watching the queue, and when wait times grow, the autoscaler quickly adds clusters. When demand falls, it scales down but keeps enough capacity for recent peaks. The cluster size still sets how big each cluster is, and the autoscaler adds or removes clusters of that size. For concurrent workloads, setting a high enough maximum cluster count still matters on serverless.

    Checkpoint 6 of 7· Check yourself

    Every Monday at 9:00, about 60 analysts run their weekly reports at the same time on a pro SQL warehouse. Its maximum cluster count is already 6, and its minimum is 1. Each Monday, queries sit in the queue for several minutes before the warehouse catches up. Which change best stops this predictable wait?

    Checkpoint 7 of 7· Exam question

    During a company-wide reporting event, dozens of analysts simultaneously open the same dashboard connected to a single SQL warehouse, and queries begin queuing noticeably. The warehouse is already set to the largest available cluster size. What change would most directly relieve this queuing?

    Sources563

    Sources

    (6)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “appear in the compute drop-down menus of workspace UIs that support SQL warehouse compute”
      ↩︎ Every Databricks SQL query runs on a warehouse
      “You can also attach a notebook to a pro or serverless SQL warehouse.”
      ↩︎ Every Databricks SQL query runs on a warehouse
      “In 2023, SQL endpoints were renamed as SQL warehouses.”
      ↩︎ Every Databricks SQL query runs on a warehouse
      “Unity Catalog governs data access permissions on SQL warehouses for most assets.”
      ↩︎ Every Databricks SQL query runs on a warehouse
      “Running a query against a stopped warehouse starts it automatically if you have access to the warehouse.”
      ↩︎ Stopped warehouses, auto-restart and auto-stop
      “A connection is established to a stopped warehouse from a JDBC/ODBC interface.”
      ↩︎ Stopped warehouses, auto-restart and auto-stop
      “You must have at least CAN MONITOR permissions on the SQL warehouse to manually restart it.”
      ↩︎ Stopped warehouses, auto-restart and auto-stop
      “Capacity management, patching, upgrades, and performance optimization are all handled by Databricks”
      ↩︎ Serverless, pro and classic warehouse types
      “Running a query against a stopped warehouse starts it automatically if you have access to the warehouse.”
      ↩︎ Exam trap 4
    2. 2.
      “The compute resource that executes SQL queries. All Databricks SQL interfaces run queries on a SQL warehouse.”
      ↩︎ Every Databricks SQL query runs on a warehouse
      “The compute resource that executes SQL queries. All Databricks SQL interfaces run queries on a SQL warehouse.”
      ↩︎ Key concept
    3. 3.
      “To create a SQL warehouse you must be a workspace admin or a user with unrestricted cluster creation permissions.”
      ↩︎ Every Databricks SQL query runs on a warehouse
      “Idle SQL warehouses continue to accumulate DBU and cloud instance charges until they are stopped.”
      ↩︎ Stopped warehouses, auto-restart and auto-stop
      “Pro and classic SQL warehouses: The default is 45 minutes, which is recommended for typical use.”
      ↩︎ Stopped warehouses, auto-restart and auto-stop
      “Type determines the type of warehouse. If serverless is enabled in your account, serverless is the default.”
      ↩︎ Serverless, pro and classic warehouse types
      “The default is a minimum and a maximum of one cluster.”
      ↩︎ How a warehouse admits, queues and scales queries
      “Serverless SQL warehouses: The default is 10 minutes, which is recommended for typical use.”
      ↩︎ Prediction
      “You can increase the maximum clusters if you want to handle more concurrent users for a given query.”
      ↩︎ Prediction
    4. 4.
      “Rapid startup time (typically between 2 and 6 seconds).”
      ↩︎ Serverless, pro and classic warehouse types
      “A pro SQL warehouse takes several minutes to start up (typically approximately 4 minutes)”
      ↩︎ Serverless, pro and classic warehouse types
      “A classic SQL warehouse supports Photon but does not support Predictive IO or Intelligent Workload Management.”
      ↩︎ Serverless, pro and classic warehouse types
      “Use a classic SQL warehouse to run interactive queries for data exploration with entry-level performance and Databricks SQL features.”
      ↩︎ Serverless, pro and classic warehouse types
      “A pro SQL warehouse supports Photon and Predictive IO, but does not support Intelligent Workload Management.”
      ↩︎ Exam trap 3
      “A pro SQL warehouse supports Photon and Predictive IO, but does not support Intelligent Workload Management.”
      ↩︎ Checkpoint
    5. 5.
      “Cluster size (for example, X-Small, Medium, Large) determines the compute resources available for a single cluster.”
      ↩︎ How a warehouse admits, queues and scales queries
      “The maximum number of queries in a queue for all warehouse types is 1,000.”
      ↩︎ How a warehouse admits, queues and scales queries
      “A consistent value above 0 indicates that you may need a larger cluster size or more clusters.”
      ↩︎ How a warehouse admits, queues and scales queries
      “Query profile: Inspect execution plans for metrics such as Bytes spilled to disk, which indicates that the warehouse size may be too small.”
      ↩︎ How a warehouse admits, queues and scales queries
      “If queries are spilling to disk, increase the cluster size.”
      ↩︎ How a warehouse admits, queues and scales queries
      “If a query waits in the queue for 5 minutes, the warehouse scales up.”
      ↩︎ How a warehouse admits, queues and scales queries
      “If load remains low for 15 consecutive minutes, the warehouse scales down”
      ↩︎ How a warehouse admits, queues and scales queries
      “If capacity exists, the query starts immediately. If not, the query is placed in a queue.”
      ↩︎ How a warehouse admits, queues and scales queries
      “IWM continuously monitors the queue. If wait times increase, the autoscaler quickly provisions more clusters to process queued queries.”
      ↩︎ How a warehouse admits, queues and scales queries
      “These SKUs have a fixed limit of one cluster per 10 concurrent queries.”
      ↩︎ Exam trap 1
    6. 6.
      “If you have only simple, short-running queries, don't increase the size (might be slower due to data shuffling).”
      ↩︎ How a warehouse admits, queues and scales queries
      “Prevents queries from being queued while waiting for scale-out.”
      ↩︎ How a warehouse admits, queues and scales queries
      “When the warehouse hits its limits, queries get queued, not rejected.”
      ↩︎ Exam trap 2

    Ready to test yourself?

    Practise the 10 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.