Sub topic 2
Choosing between serverless, pro, and classic warehouses
This chapter assumes you know basic SQL, can find your way around the Databricks workspace, and understand how cloud compute is billed. It covers the three SQL warehouse types and how to pick one. Sizing and scaling come in the next chapters.
The working model
Every SQL warehouse runs the same Photon engine, but the three types differ in where the compute runs and which features they include.
- Classic runs in your own cloud account. It has the fewest features and is the cheapest per DBU (Databricks Unit, the billing unit for compute).
- Pro also runs in your cloud account. It adds features such as query federation and some performance improvements.
- Serverless runs in Databricks' account, not yours. It has every Pro feature plus Intelligent Workload Management, which adjusts capacity to the queries that arrive.
The biggest practical difference is start time. Classic and Pro warehouses need to provision virtual machines in your account, which commonly takes several minutes. Serverless warehouses draw on a pool of ready capacity and usually start in a few seconds.
Comparing the types
| Aspect | Classic | Pro | Serverless |
|---|---|---|---|
| Compute location | Your account | Your account | Databricks account |
| Typical start time | Minutes | Minutes | Seconds |
| Feature set | Basic | Extended | Extended plus workload management |
| Price per DBU | Lowest | Middle | Highest |
| Infrastructure setup | You manage networking | You manage networking | Managed for you |
Check current pricing and regional availability in the Databricks documentation. Serverless is not offered in every region, and the price gap changes over time.
How to decide
Start with serverless when it is available to you. Fast start pairs well with a short auto stop timeout, so you pay for little idle time. The higher DBU price is often offset by this, especially for interactive or bursty work.
Choose pro when serverless is unavailable in your region or blocked by policy, but you need features that classic lacks.
Choose classic for steady, predictable workloads where start time does not matter and you want the lowest DBU price. A scheduled nightly job is a typical example.
Common errors
- Picking classic for interactive work. Analysts wait minutes for a cold start, then ask for longer auto stop timeouts. The idle time costs more than the DBU savings.
- Assuming a feature exists on every type. If a feature seems missing in the editor, check the warehouse type first.
- Comparing only DBU prices. Include VM costs and idle time in any comparison.
Choosing a type from the API
The warehouse type is set when you create it. Here is a minimal request that creates a serverless warehouse through the REST API.
curl -X POST "$DATABRICKS_HOST/api/2.0/sql/warehouses" \
-H "Authorization: Bearer $DATABRICKS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "analytics-serverless",
"cluster_size": "Small",
"warehouse_type": "PRO",
"enable_serverless_compute": true,
"auto_stop_mins": 10
}'For serverless, the API requires warehouse_type to be PRO and enable_serverless_compute to be true. For a classic warehouse, set warehouse_type to CLASSIC.
Exercise
Your team runs ad hoc queries during the workday, with long gaps between bursts. Serverless is available in your region. Which type do you choose, and why does a higher DBU price not rule it out?
Show answer
Choose serverless. It starts in seconds, so you can use a short auto stop timeout and pay for very little idle time. For bursty work, that often offsets the higher DBU price. Serverless also removes the separate VM bill and the networking setup.