cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Analyzing Serverless SQL Warehouse Cost Projection Using System Tables

mstfkmlbsbdk
New Contributor II

Hello everyone,

I'm working on analyzing cost projections for Serverless SQL Warehouses using system tables, and I’d like to share a visualization approach I’m using to highlight some key differences between classic and serverless SQL warehouses. (Look SS)

Screenshot 2025-05-21 at 11.51.03.png

Graph 1: Query Execution Timeline

X-axis: Time of day

Y-axis: Date (covering the last month)

Details: This graph shows when queries were triggered across different warehouse_ids and how long each query took to execute.

Graph 2: Classic SQL Warehouse Cluster Duration

X-axis: Time of day

Y-axis: Date (covering the last month)

Details: This graph illustrates the cluster duration times for queries executed on classic SQL warehouses for selected warehouse_ids.

Graph 3: Serverless SQL Warehouse Cluster Duration

X-axis: Time of day

Y-axis: Date (covering the last month)

Details: This graph shows the cluster duration times for queries executed on serverless SQL warehouses for selected warehouse_ids.

Key Insight:

The goal of this comparison is to demonstrate that classic SQL warehouses remain active even when no queries are running, leading to potentially higher costs. In contrast, serverless SQL warehouses spin up immediately when a query is triggered and shut down right after execution, offering a more cost-efficient model.

I look forward to hearing your thoughts, suggestions, and queries on how to obtain this visualization and how to improve this analysis and visualization.

Thanks in advance.

1 REPLY 1

nikhilj0421
Databricks Employee
Databricks Employee

Hi @mstfkmlbsbdk, great analysis. 

However, as you mentioned, the classic warehouse is not terminating even though there are no active queries on it. The reason for that is while creating a classic warehouse, by default it takes 45 minutes to terminate automatically if there is no active queries. You can set it to minimum 10 minutes which is the default for serverless, and can save the cost. 

nikhilj0421_0-1747977725624.png

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now