0
0
AzureComparisonBeginner · 4 min read

DTU vs vCore in Azure SQL: Key Differences and When to Use Each

In Azure SQL, DTU (Database Transaction Unit) is a bundled measure of CPU, memory, and I/O resources, while vCore (virtual core) lets you choose CPU and memory separately for more flexibility. DTU is simpler for fixed workloads, and vCore offers better control and scalability for complex or variable workloads.
⚖️

Quick Comparison

This table summarizes the main differences between DTU and vCore purchasing models in Azure SQL.

FactorDTU ModelvCore Model
Resource MeasurementBundled CPU, memory, and I/O as a single unitSeparate CPU cores and memory allocation
FlexibilityFixed resource bundles, less flexibleCustomizable resources for workload needs
PricingSimple, fixed price per DTU tierPay for actual vCores and memory used
Performance TransparencyLess clear resource allocationClear CPU and memory specs
Best ForPredictable, smaller workloadsVariable or large workloads needing scaling
LicensingIncluded in priceCan use existing SQL Server licenses with Azure Hybrid Benefit
⚖️

Key Differences

The DTU model bundles CPU, memory, and I/O into a single unit, making it easy to pick a performance level without worrying about individual resources. This simplicity is good for beginners or predictable workloads but can limit fine-tuning.

In contrast, the vCore model separates CPU and memory, allowing you to choose exactly how many virtual cores and how much memory your database uses. This gives more control and transparency, especially for larger or variable workloads.

Pricing also differs: DTU pricing is fixed per tier, while vCore pricing is based on the number of cores and memory, plus optional license benefits. This makes vCore better for cost optimization and scaling.

⚖️

Code Comparison

Here is an example of how you might create an Azure SQL database using the DTU model with Azure CLI.

bash
az sql db create --resource-group myResourceGroup --server myServer --name myDatabase --service-objective S3
Output
Database 'myDatabase' created with S3 DTU performance level.
↔️

vCore Equivalent

Here is how to create the same Azure SQL database using the vCore model with Azure CLI.

bash
az sql db create --resource-group myResourceGroup --server myServer --name myDatabase --edition GeneralPurpose --family Gen5 --capacity 4
Output
Database 'myDatabase' created with 4 vCores on Gen5 hardware in General Purpose tier.
🎯

When to Use Which

Choose DTU when you want a simple, predictable pricing model and your workload is steady and not very large. It is great for beginners or small apps.

Choose vCore when you need more control over CPU and memory, want to optimize costs, or expect your workload to grow or vary. It is better for enterprise apps and scaling.

Key Takeaways

DTU bundles CPU, memory, and I/O into one fixed unit, simplifying choices but limiting flexibility.
vCore separates CPU and memory, offering more control and clearer performance specs.
DTU pricing is fixed per tier; vCore pricing is based on actual resources used.
Use DTU for simple, predictable workloads and vCore for scalable, variable workloads.
vCore supports Azure Hybrid Benefit for cost savings with existing licenses.