Swiftorial Logo
Home
Swift Lessons
Matchuup
CodeSnaps
Tutorials
Career
Resources

Tech Matchups: Azure SQL Database Serverless vs Provisioned

Overview

Picture your database as a cosmic engine, where compute models drive performance. Azure SQL Database Serverless, launched in 2019, is the adaptive navigator—a serverless compute tier that auto-scales and pauses, used by 15% of Azure SQL customers (2024).

Azure SQL Database Provisioned, introduced in 2014, is the steady titan—a fixed-capacity compute tier for predictable workloads, powering 25% of Azure SQL deployments.

Both are relational database powerhouses, but their approaches differ: Serverless optimizes for sporadic workloads, while Provisioned ensures consistent performance. They’re vital for apps from e-commerce to analytics, balancing cost with stability.

Fun Fact: Serverless can pause compute to save costs during idle periods!

Section 1 - Compute Model and Setup

Serverless auto-scales—example: deploy a database:

az sql db create --resource-group myRG --server myserver --name mydb --edition GeneralPurpose --compute-model Serverless --min-capacity 0.5 --max-size 100GB

Provisioned uses fixed vCores—example: deploy a database:

az sql db create --resource-group myRG --server myserver --name mydb --edition GeneralPurpose --compute-model Provisioned --vcore 4 --max-size 100GB

Serverless scales from 0.5-40 vCores and pauses after inactivity—think handling 1,000 sporadic queries/day. Provisioned allocates fixed vCores (e.g., 4) for steady performance—think 10,000 queries/hour. Serverless is dynamic, Provisioned static.

Scenario: Serverless powers a dev/test DB; Provisioned runs a production ERP. Choose by workload pattern.

Section 2 - Performance and Scalability

Serverless scales dynamically—example: 1,000 queries spike to 10,000 with ~10ms latency, auto-scaling in ~1s. Pauses after 1-hour inactivity, resuming in ~30s.

Provisioned delivers fixed performance—example: 10,000 queries/hour at ~5ms latency with 4 vCores. Scales by manually adjusting vCores or tier.

Scenario: Serverless handles unpredictable IoT data; Provisioned supports a retail app. Serverless excels in flexibility, Provisioned in consistency—pick by predictability.

Key Insight: Serverless’s auto-pause slashes costs for intermittent workloads!

Section 3 - Cost Models

Serverless is per vCore-second—example: 1 vCore-hour at ~$0.10 costs ~$72/month for 10 hours/day. Free tier includes 100GB storage.

Provisioned is per vCore-hour—example: 4 vCores at ~$0.34/hour cost ~$244/month for 24/7. No pausing, so costs are fixed.

Practical case: Serverless suits variable workloads; Provisioned fits constant apps. Serverless is usage-based, Provisioned fixed—optimize by runtime.

Section 4 - Use Cases and Ecosystem

Serverless excels in dynamic apps—example: 1,000 daily queries for a mobile app. Provisioned shines in steady apps—think 10,000 queries/hour for a CRM.

Ecosystem-wise, both integrate with Azure Functions and Power Apps. Serverless pairs with Event Grid for event-driven apps; Provisioned with Azure Analysis Services for BI.

Practical case: Serverless runs a startup’s DB; Provisioned powers an enterprise app. Choose by workload stability.

Section 5 - Comparison Table

Aspect Serverless Provisioned
Compute Auto-scale, pause Fixed vCores
Performance ~10ms ~5ms
Cost ~$0.10/vCore-hour ~$0.34/vCore-hour
Scalability Dynamic Manual
Best For Sporadic apps Steady apps

Serverless suits variable workloads; Provisioned excels in consistent apps. Choose by usage pattern.

Conclusion

Azure SQL Database Serverless and Provisioned are relational database powerhouses with distinct strengths. Serverless offers auto-scaling and pausing for cost-efficient, sporadic workloads, ideal for startups or dev/test environments. Provisioned delivers fixed, predictable performance for steady, high-throughput apps, perfect for enterprise systems. Consider workload pattern (variable vs. constant), performance needs (flexible vs. stable), and cost constraints.

For dynamic apps, Serverless shines; for mission-critical systems, Provisioned delivers. Pair Serverless with Functions or Provisioned with Power BI for optimal results. Test both—Serverless’s free tier or Provisioned’s pay-as-you-go model make prototyping easy.

Pro Tip: Use Serverless’s auto-pause for cost savings in non-production DBs!