'Why is Azure SQL database so expensive?

For a small personal coding project I recently created a SQL database in Azure. For the past weeks I have been hardly using the database, out of 2 GB available space I have been using only 13 MB.

However, the database costs me 6,70 EUR per day and I don't understand why this is the case. Read a few topics/posts stating that the costs with similar use should be around 5-7 EUR per month, not per day.

This is the configuration for the database:

  • No elastic pool
  • General purpose, Gen5, 2 vCores
  • West Europe

Does anyone have an idea about what could be causing the costs per month to be so high?



Solution 1:[1]

You're paying for the entire infrastructure is why. It really only saves on upfront cost. A dedicated server, Windows Server + SQL Server Web will run you, at least $5K. Performance wise, a dedicated server at a colo center will be a lot cheaper to run once you get the hardware. I know, I've switched several companies off of Azure and, instead of paying $2500/mo, they pay $200/mo (after the server) for 4U at a colo + $100/mo basic maintenance and 1TB/mo bandwidth, so it adds up. For example, I built 2 custom 1U servers (12 core/32GB) for $8500 and an opensource router for another $500 (pfSense), including OSes & SQL Server Web. Initial setup of both servers including SQL and the router for 16 IP Addresses was about $1K. Total cost was $10K up front. The equivalent horsepower and storage from Azure was $2500/mo. In 1 year on Azure it ran $30K! 1 year on colo (hosting + maintenance) was $13600, the following year was $3600. So far in 5 years, they saved ~$122,000. There was only 15mins of downtime during the entire period. Cloud hosting is a great idea, but it will never save you time nor money at the rates these company's charge. As far as downtime, I have been hosting for 2 decades and the worst downtime happened due to a network failure (that also took out multiple cloud providers) and it was 13 hours. The only other one was due to a fried router (about 3 hours). Just my take on it - Cloud hosting is still way too expensive for what you actually get & redundancy is nice but you can buy a new server every 2 months for the price difference (just get good equipment w/redundant power supplies and hot swap drives - in a 55 degree colo center, failures are rare)

Solution 2:[2]

It seems you don't know Azure offers a free tier. Please refer to this StackOverflow thread for details on how to take advantage of the free tier that supports databases of 32 MB of space.

Solution 3:[3]

If it is a small project you can run it on Ubuntu Linux and it's $3.80/month or $0.0052/hour. On top of this, you can install MySql or SQL Express. I personally find MySql easier to access/configure

Solution 4:[4]

It's sure that Azure offers a free tier but still you can optimize it with very low cost if you use any purchased plan.

Here I provided some direction on the picture below that how to create free App Service Plan

App Service Plan

Now let's see how we can optimize the cost for small database size for your purchased plan.

  1. Go to the option of Create SQL Database
  2. Click on the link Configure Database as per the below picture

Configure Database

  1. Then Select the Basic option under DTU-Based as per the below picture

Basic option

As the above picture shows, the default selected option is General Purpose option under VCore-Based section, so it costs $410 as it provides you 32 GB database.

As Basic option is selected, so DB Size is changed into 2 GB instead of 32 GB, hence cost is changed into just $5.64 instead of $410

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MC9000
Solution 2 Alberto Morillo
Solution 3 Kabindas
Solution 4 Khabir