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:ย 

SERVERLESS SQL WAREHOUSE

Punit_Prajapati
New Contributor II

Hello All,

I have two questions regarding the serverless SQL warehouse which are following:

1.) If I create a small Serverless SQL Warehouse in Databricks that shows 12 DBUs/hour, will I be charged 12 DBUs even if I donโ€™t run any queries in that hour? Or does billing happen only based on actual query execution time?

2.) If I run two queries on the same Serverless SQL Warehouse, and both take the same execution time, but one query is more complex and consumes more DBUs, will both be charged equally, or will the cost differ based on actual DBU usage?

help me getting my doubts cleared.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Shua42
Databricks Employee
Databricks Employee

Hey there,

Happy to shed some light here. DBU's are charged based on uptime of the compute.

So for example, in question 1, if you start a small Serverless SQL Warehouse, you will only be charged for the uptime. If you leave the cluster on for 30 minutes and it's 12 DBU's/hour, since it's .5 hours you will be charged 6 DBU's for that session. 

Related to question 2, since the DBU's are based on uptime, running more queries will not increase the amount of DBU's charged, unless you have scaling enabled. The queries may just take longer to run, but it will incur the same charge. If you do have scaling on and you're running a lot of complex queries, it may scale up, and that is determined based on how you configured the warehouse.

Hope this helps clarify things.

View solution in original post

BigRoux
Databricks Employee
Databricks Employee

Shua42 hits the nail on the head.

If I can be so bold as to summarize:

You are only charged when the Warehouse is running regardless of how much or how little you use it.  We do have an auto stop feature you can configure. Essentially, you set a timeout and if nothing happens on the Warehouse in that time period (nobody runs queries) it will automatically shut down. It is a cost saving feature.  Cheers, Lou.

View solution in original post

3 REPLIES 3

Shua42
Databricks Employee
Databricks Employee

Hey there,

Happy to shed some light here. DBU's are charged based on uptime of the compute.

So for example, in question 1, if you start a small Serverless SQL Warehouse, you will only be charged for the uptime. If you leave the cluster on for 30 minutes and it's 12 DBU's/hour, since it's .5 hours you will be charged 6 DBU's for that session. 

Related to question 2, since the DBU's are based on uptime, running more queries will not increase the amount of DBU's charged, unless you have scaling enabled. The queries may just take longer to run, but it will incur the same charge. If you do have scaling on and you're running a lot of complex queries, it may scale up, and that is determined based on how you configured the warehouse.

Hope this helps clarify things.

Thank you so much @Shua42  for clarifying.

 

BigRoux
Databricks Employee
Databricks Employee

Shua42 hits the nail on the head.

If I can be so bold as to summarize:

You are only charged when the Warehouse is running regardless of how much or how little you use it.  We do have an auto stop feature you can configure. Essentially, you set a timeout and if nothing happens on the Warehouse in that time period (nobody runs queries) it will automatically shut down. It is a cost saving feature.  Cheers, Lou.

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