Save Money on Azure SQL DB

Regular readers of this blog know I am all about saving money. I’ve blogged about ways to set up inexpensive instances of Azure SQL DB. I recently learned a couple new ways to save even more money working with Azure SQL. Both methods begin the same:

The Stuff in Common

Begin by connecting to the Azure Portal at portal.azure.com. Once connected and logged in, type “SQL data” into the “Search resources, services, ad docs (G+/)” search box at the top of the portal. Select “SQL databases” in the “Services” category:

When the “SQL databases” blade displays, click the “+ Create” button:

The “Create SQL Database” blade displays.

In this post I describe two options for creating inexpensive Azure SQL DBs, and this is where the methods diverge.

Try Azure SQL Database Free

If you click the “Apply offer (Preview)” button, the verbiage changes to:

Complete the “Create SQL Database” configuration to enjoy a free serverless database with the “first 100,000 vCore seconds, 32GB of data, and 32GB of backup storage free per month for [the] lifetime of the subscription.” That sounds like “free” to me, but I want to make sure I do not misrepresent the offer.

This is the best option because:

  1. It’s free!
  2. You get to work with a larger set of data (32GB)!

One Less-Expensive Azure SQL DB Configuration

If I accept the defaults as I initially configure a new server for my Azure SQL Database, I may see the cost of the default server configuration similar to that shown here:

I promise I am not complaining here. I simply note that – most of the time – I do not need a server provisioned according to this default. Most often I build Azure SQL Databases for demos. For demo databases, I can get under $327.97USD per month.

I can hear some of you thinking,…

“How, Andy?”

I’m glad you asked!

One way to reduce the cost of an Azure SQL Database is to manage the following four configuration settings* **, labeled:

  1. Want to use SQL elastic pool?
  2. Workload environment
  3. Compute + storage
  4. Backup storage redundancy:

* These configuration settings have little to large effect on costs (at the time of this writing), but their effects on costs may vary in the future.

** This is not an exhaustive list of configuration settings that may impact the cost of Azure SQL Databases.

I make the following changes to these configuration settings:

  1. Make sure SQL elastic pool is set to No
  2. Set Workload environment to Development
  3. Configure the database (more in a bit)
  4. Set Backup storage redundancy to “Locally-redundant backup storage”:

The most impactful change is #3: Configure the database (by changing 1 setting in the Compute + storage configuration).

Remember I wrote earlier: “For demo databases, I can get under $327.97USD per month?” Well, $0.30USD per month is less expensive than $327.97USD per month – a total of $327.67USD less expensive per month:

Configure the SQL Database

The secret to reducing the cost this much is to change one property on the Compute + storage configuration. Click the “Configure database” link to open the Configure blade.

When the Configure blade displays, change the “Data max size (GB)” property from 32 to 2:

This setting dramatically reduces the cost of the database. Of course, if you need to store more than 2GB of data, you will need to increase the “Data max size (GB)” property configuration. But if you can get away with 1GB data max size, the costs are $0.15USD per month:

Pay attention to the math inside the blue box in the image above.

  • Cost per GB (in USD) is $0.12
  • Max storage selected (in GB) is 1.3
  • $0.12 x 1.3 == $0.15 USD per month

Conclusion

I know 1 or 2 GB isn’t a lot of data.
I also know you don’t need a lot of data to learn the basics of Azure SQL DB.

I hope these cost-saving tips help lower the barrier so you begin exploring Azure SQL Databases!

Learn More!

You, me, Azure Data Factory. (Hey! That rhymes!)

Join me 27-29 Feb 2024 for a 2.5-day, live, online course – with labs! – titled From Zero to Azure Data Factory. Register today and save 55%.

Andy Leonard

andyleonard.blog

Christian, husband, dad, grandpa, Data Philosopher, Data Engineer, Azure Data Factory, SSIS guy, and farmer. I was cloud before cloud was cool. :{>

2 thoughts on “Save Money on Azure SQL DB

  1. Hello Andy, do you know if there is a way to edit the Workspace Environment after the database creation?

    I have a few databases that we use for development and I would like to switch them to development.

    Thank you

    1. Hi Francesco,

      It is my understanding – informed by https://learn.microsoft.com/en-us/answers/questions/1107082/how-to-modify-the-workload-environment-of-a-create – that Workspace Environment is not a stored Azure SQL Database setting, but a configuration option that establishes a default set of database compute and storage configuration ranges. The information “blurb” just below Workspace Environment options is shown in the image above and reads:

      “Default settings provided for the workloads. Configurations can be modified as needed.”

      To modify compute and storage Azure SQL Database configurations, visit the Azure SQL Database | Compute + storage page to update workspace environment-related configuration settings. The configuration screen header reads: “Service and compute tier” and appears similar to the second image under the heading “Configure the SQL Database” displayed in my post.

      I hope this helps,
      Andy

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.