Azure Database Pricing Examples & 5 Ways to Reduce Your Costs

Azure Database Pricing Examples and 5 Ways to Reduce Your Costs

What Are Azure Database Services? 

Azure database services are powerful cloud-based data management systems provided by Microsoft Azure. They are designed to handle vast amounts of data and offer scalability, reliability, and security. Azure databases are offered as a service, which means you don’t need to worry about many aspects of infrastructure management and database maintenance.

While each Azure database service provides specific features and capabilities, they all provide on-demand scalability, high availability, automatic updates, and multiple pricing tiers that can help you optimize your costs. They also come with Azure’s robust security and compliance offerings, which help protect your data and ensure your business meets regulatory requirements.

There are several Azure database services, each designed to cater to specific workloads and data models. These include Azure SQL Database, a fully managed relational database service compatible with Microsoft SQL Server; Azure Cosmos DB, a globally distributed, NoSQL database service; and Azure Database for PostgreSQL, a fully managed version of the popular open source PostgreSQL database, among others.

This is part of a series of articles about Azure pricing.

In this article:

Common Pricing Metrics of Azure Databases

The cost of Azure database services is primarily determined by three metrics: compute units, storage costs, and data transfer costs.

Compute Units

Compute units represent the power of the database. One compute unit metric used by Azure services is Database Transaction Units (DTUs), which combines CPU, memory, and I/O resources into one metric. Another is vCores, which is more focused on the number of virtual CPU cores the database offers. 

The more compute units you have, the more powerful your database is. Azure provides several tiers, each designed to cater to different workloads. You can also scale your compute units up or down as per your requirements, ensuring you only pay for what you need.

Storage Costs

Storage costs refer to the price you pay for storing your data in Azure Databases. The cost is based on the amount of data you store, and it’s charged on a gigabyte-hour basis. Azure offers a range of storage options, including premium, standard, and basic, each catering to different performance levels and price points. You also have the option to increase or decrease your storage capacity per your needs.

Data Transfer Costs

Data transfer costs refer to the cost of transferring data in and out of your Azure Database. Data transfer within the same Azure region is usually free, but transferring data to a different region or outside Azure may incur charges. These costs can vary based on the amount of data transferred and the region to which it’s transferred.

Azure Database Services with Pricing Examples 

Azure provides a range of database services, each with its pricing model. Here, we’ll look at the costs for several popular Azure Database services. Azure database pricing is very complex, so we can offer only a few basic examples. For all pricing options, and up-to-date pricing, consult the official Azure pricing page.

Azure SQL Database

Azure SQL Database is a fully managed relational database service that offers intelligent, scalable, and highly available databases. The pricing of Azure SQL Database is based on two models: the DTU-based model and the vCore-based model. Each model has several tiers which determine the database’s performance level.

vCore model

When you run Azure SQL Database in the vCore model, there are three service tiers: General Purpose for non-critical workloads, Business Critical for IO-intensive workloads requiring high resilience to failure, and Hyperscale for rapid scaling of storage up to 100 TB. To make things even more complex, each tier has several hardware options. 

Here examples of the cost of each tier with the most basic Standard-Series hardware:

  • $2.522 for General Purpose / Standard-Series with 51 GB RAM
  • $6.795 for Business Critical / Standard-Series with 51 GB RAM
  • $2.827 for Hyperscale / Standard-Series with 51 GB RAM

DTU model

In the DTU model, moving to a higher tier provides improved performance and more storage. For example, the hourly cost of 10 DTUs will be:

  • $0.0136 for Basic Tier with 4 GB RAM
  • $0.0202 for Standard Tier with 250 GB RAM
  • The Premium Tier starts from 125 DTUs which cost $0.6251 per hour with 500 GB RAM.

Azure Cosmos DB

Azure Cosmos DB is a globally distributed, multi-model database service that offers single-digit millisecond latency, guaranteed high availability, and automatic and instant scalability. The pricing for Azure Cosmos DB is based on provisioned throughput and consumed storage.

Provisioned throughput is measured in Request Units per second (RU/s), and you’re billed for the maximum RU/s that you provision in an hour. The price starts from around $0.008/hour for 100 RU/s.

The storage cost is based on the total amount of data stored in your Cosmos DB account, including metadata and system information. The price is around $0.25/GB/month.

Azure Database for PostgreSQL

Azure Database for PostgreSQL is a fully managed relational database service that combines the community edition of PostgreSQL with Azure to deliver high-performance, highly available databases. The pricing for this service is based on a similar vCore model as the Azure SQL Database.

In the general purpose tier, the price starts from around $16/month per vCore, and the storage cost is approximately $0.11/GB/month. In the memory-optimized tier, the price starts from around $11/month per vCore, and the storage cost is the same.

Azure Database for MySQL

Azure Database for MySQL is a fully managed database service that uses the open-source MySQL database engine. It is designed to handle the demanding requirements of modern applications, offering built-in high availability, security, and scalability.

In terms of pricing, Azure Database for MySQL offers a flexible model. For instance, the General Purpose starts at $15/month per vCore per month, and the storage cost is approximately $0.11/GB/month. The Business Critical tier starts at $86/month per vCore, with the same storage cost of $0.11/GB/month.

Related content: Read our guide to Azure spot pricing

5 Ways to Reduce Azure Database Costs 

To get the most value from your Azure Database services, it’s important to optimize your pricing. Here are some strategies you can implement.

1. Right-Size Resources

Right-sizing resources is crucial in optimizing Azure Database costs. This involves estimating the amount of resources—such as compute, storage, and network—that your applications need and choosing an appropriate service tier and compute size. Overprovisioning can lead to unnecessary costs, while underprovisioning can impact performance.

2. Implement Auto-Scaling

Auto-scaling is a feature that automatically adjusts the resources of your Azure Database service based on the workload. This can help you manage costs effectively by ensuring you only pay for the resources you use. When demand is low, auto-scaling reduces resources, decreasing costs. When demand is high, it increases resources to maintain performance.

Some Azure database services require you to configure and manage auto-scaling options, while others, such as Cosmos DB, provide fully automated scaling in a serverless model.

3. Implement Query and Index Optimizations

Query and index optimizations are also a great way to minimize Azure Database costs. Unoptimized queries can consume more resources and take longer to execute, thus increasing costs. On the other hand, well-optimized queries can help in reducing resource utilization and improving database performance.

To optimize your queries, use Azure’s Query Performance Insights tool. This tool provides insights into your database’s workload and helps identify queries that consume the most resources. Similarly, use Azure’s Automatic Indexing feature to create and manage indexes. Proper indexing can significantly reduce the amount of resources needed to execute queries.

4. Consider Database Consolidation

Database consolidation is another effective technique for reducing Azure Database costs. By consolidating multiple databases into a single database or a single server, you can more efficiently utilize resources, and thus save money.

Before consolidating, ensure that your databases are compatible in terms of performance requirements, security, and isolation needs. Also, consider the potential impact on performance and manageability. Azure offers Elastic Pools, a service that allows you to manage and scale multiple databases that have varying and unpredictable usage patterns, which can be a great solution for database consolidation.

5. Use Cost Management Tools

Lastly, using Azure’s cost management tools can provide insights into your spending and help identify opportunities for cost savings. Azure Cost Management and Azure Advisor are two such tools. Azure Cost Management provides detailed cost and usage data, while Azure Advisor offers personalized recommendations on how to optimize your Azure resources. Third-party cost management tools can provide more advanced cost optimization capabilities.

Azure Database Cost Optimization with Spot by NetApp

Taking steps to reduce and control cloud infrastructure costs requires ongoing effort and diligence that could all too easily consume significant amounts of time for already overstretched CloudOps teams.

To help address that challenge, Spot has created a suite of products for Azure built on unique machine learning and analytics, that go beyond cloud visibility and guidance to actually automate Azure workloads on an optimal blend of spot VMs, reserved instances and, if needed, pay-as-you-go pricing. All of this is provided without compromising availability, performance and flexibility, ensuring optimized infrastructure for scale-out applications, Kubernetes workloads and more.

Learn more about automated Azure cost optimization with Spot.io