Databricks

Choosing Between Databricks Job Cluster, All-Purpose Cluster, and SQL Warehouse

2026-03-26
更新: 2026-03-27
NicheeLab Editorial Team

Databricks offers three types of compute resources, each built around a different design philosophy. Defaulting to "just run everything on an All-Purpose Cluster" is cost-inefficient, and "trying to write Python on a SQL Warehouse" is a classic beginner pitfall. This article lays out the essential differences between the three compute types and the criteria for choosing the right one for each workload.

Three-Compute Comparison Table

AspectJob ClusterAll-Purpose ClusterSQL Warehouse
Primary use caseProduction ETL and scheduled jobsInteractive development, exploration, ML experimentsSQL analytics, BI integration, dashboards
DBU rate (rough)Low (Jobs Compute pricing)High (All-Purpose Compute pricing)Middle (SQL Compute pricing)
LifecycleAuto-created when the job starts, auto-deleted when it endsStarted manually or via API, stopped manually or via Auto TerminateStarted manually, stopped automatically by Auto Stop
User sharingNot allowed (job-dedicated)Allowed (multiple users concurrently)Allowed (handles queries from many users)
Supported languagesPython / Scala / R / SQL / Spark SubmitPython / Scala / R / SQLSQL only
PhotonOptional (can be enabled)Optional (can be enabled)Enabled by default
Unity Catalog supportSupported (Shared / Single User Mode)Supported (Shared / Single User Mode)Fully supported (always UC-integrated)
Init ScriptGlobal / Cluster-scoped (Single User mode)Global / Cluster-scoped (Single User mode)Not supported
ScalingAutoscaling (node count)Autoscaling (node count)Auto scale-out by cluster count
Serverless variantServerless JobsServerless NotebooksServerless SQL Warehouse

Selection Decision Flow

Pick the right compute by following the flow below, based on workload characteristics.

Step 1: Nature of the workload

  • Scheduled execution / automated batch processing → Job Cluster
  • Interactive notebook development and debugging → All-Purpose Cluster
  • SQL analytics / BI integration / dashboards → SQL Warehouse

Step 2: Language requirements

  • Need Python / Scala / R → Job Cluster or All-Purpose Cluster
  • SQL only → SQL Warehouse is the best fit

Step 3: Cost sensitivity

  • Production jobs where minimizing DBU cost matters → Job Cluster (lowest rate)
  • Dev environment where always-on cost is acceptable → All-Purpose Cluster
  • Cost-efficient SQL analytics → SQL Warehouse + Auto Stop

Job Cluster: Characteristics and Design Notes

A Job Cluster is tightly coupled to job execution. When you define a Databricks Job and specify cluster spec in the new_cluster field, a new cluster is created at the start of every Run and is automatically deleted when the Run finishes.

  • DBUs are only consumed during job execution; idle cost is zero
  • Every Run executes in a clean environment, so no state pollution carries over
  • Cluster Policy can govern spec to standardize configurations
  • Combining with Instance Pool shortens startup time

All-Purpose Cluster: Characteristics and Design Notes

All-Purpose Cluster is optimized for interactive development. Multiple notebooks can be attached and executed simultaneously, making it well-suited for debugging and data exploration.

  • After startup, billing continues until manual stop or Auto Terminate (default: 120 minutes of idle)
  • DBU rate is higher than Job Cluster, so it is not suitable for running production batches
  • Library installs and Spark config changes can be applied immediately
  • When multiple users share via Shared Access Mode, watch for resource contention

SQL Warehouse: Characteristics and Design Notes

SQL Warehouse is SQL-dedicated compute that runs queries from the Databricks SQL UI or from BI tools (Tableau, Power BI, etc.).

  • Photon engine is enabled by default for fast SQL execution
  • Automatic query performance optimization via Result Cache, Disk Cache, and IWM
  • Auto-scaling cluster count to scale out concurrent execution
  • Python / Scala / R cannot be executed
  • Always integrated with Unity Catalog, ensuring governance

Cost Optimization Patterns

PatternFixExpected effect
Developers running production batches on All-PurposeMigrate to Job ClusterLower DBU rate + reduced idle cost
Leaving All-Purpose Clusters running idleSet Auto Terminate to 30-60 minutesReduces idle DBU
Large clusters with fixed node countEnable Autoscaling (min=1, max=N)Auto-reduce node count during low load
Running SQL analytics and Python dev on the same clusterSplit: SQL → SQL Warehouse, Python → All-PurposeUse the best-fit compute for each workload
Dev clusters using GPU instancesRestrict instance types to CPU via Cluster PolicyPrevent unnecessary use of expensive instances
Job Cluster startup takes too longPre-warm instances with Instance PoolShorter startup (minutes → tens of seconds)

Exam Hot Spots

  • "Most cost-efficient compute for production ETL jobs" → Job Cluster
  • "Recommended compute when multiple analysts run SQL queries concurrently" → SQL Warehouse
  • "Best compute for running Python ML experiments in a notebook" → All-Purpose Cluster
  • "DBU rate difference between Job Cluster and All-Purpose Cluster" → Job Cluster is lower
  • "Can SQL Warehouse run Python UDFs directly?" → No (SQL only)

Check Your Understanding

Data Engineer Associate

問題 1

A team runs the following three workloads on Databricks: (1) a PySpark ETL pipeline that runs daily at 6:00 AM, (2) interactive ML experiments by 3 data scientists, and (3) executive dashboards (20 SQL reports). Which compute configuration handles all workloads appropriately while minimizing cost?

  1. Run every workload on a single large All-Purpose Cluster
  2. ETL → Job Cluster, ML experiments → All-Purpose Cluster, dashboards → SQL Warehouse
  3. ETL → SQL Warehouse, ML experiments → SQL Warehouse, dashboards → All-Purpose Cluster
  4. ETL → All-Purpose Cluster, ML experiments → Job Cluster, dashboards → Job Cluster

正解: B

B is correct because it assigns the best-fit compute to each workload. ETL goes on Job Cluster for low DBU rate + auto termination, ML experiments use All-Purpose Cluster for interactive development, and dashboards use SQL Warehouse to leverage fast SQL + caching + concurrent-execution scaling. A is inefficient due to the high DBU rate, C cannot run PySpark on SQL Warehouse, and D cannot do interactive development on a Job Cluster.

Frequently Asked Questions

Should I avoid using an All-Purpose Cluster for production ETL?

It works technically, but it is discouraged for two reasons. First, the DBU rate is higher than Job Cluster (All-Purpose: ~0.40 DBU/h vs Job: ~0.15 DBU/h, varies by region), so running daily batches on an All-Purpose Cluster more than doubles the cost. Second, All-Purpose Clusters are designed to stay running and incur idle costs, while Job Clusters spin up only when the job runs and terminate immediately after, eliminating waste.

Both SQL Warehouse and All-Purpose Cluster can run queries — how do I choose between them?

Use SQL Warehouse for SQL-centric workloads (dashboards, reports, ad-hoc analytics), and All-Purpose Cluster for interactive Python/Scala/R development and ML experiments. SQL Warehouse enables the Photon query engine by default and delivers overwhelmingly better SQL performance thanks to Result Cache, Disk Cache, and IWM.

Where does Serverless Compute fit among Job Cluster, All-Purpose Cluster, and SQL Warehouse?

Serverless is offered as an option for all three compute types. Serverless SQL Warehouse is for SQL, Serverless Notebooks for interactive Python development, and Serverless Jobs for job execution. All of them eliminate infrastructure management and start quickly, but they impose restrictions on custom libraries and Init Scripts.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Databricks

Databricks Certifications: All 7 Exams, Difficulty & Study Plan (2026)

Complete guide to all 7 Databricks certifications — Data Eng...

Databricks

Databricks Exam Difficulty Ranking: All 7 Certs Compared (2026)

Every Databricks certification ranked by difficulty, with st...

Databricks

Databricks Study Guide: Fastest Pass Route & Time Estimates (2026)

How to pass Databricks certifications efficiently. Official ...

Databricks

Databricks Data Engineer Associate: Complete Guide (2026)

Domain-by-domain breakdown of the Databricks Certified Data ...

Databricks

Databricks Data Engineer Professional: Complete Guide (2026)

Tactics for the Databricks Certified Data Engineer Professio...

Browse all Databricks articles (110)
© 2026 NicheeLab All rights reserved.