SQL Server Performance Tuning

How SQL Tuning Saved Six Figures and Cut Cores by 75%

Updated
8 min read
Written by
Saulius Baskevicius
Reviewed by
Mark Varnas

An ERP software company was running SQL Server on a 16-core Azure VM with serious performance and reliability issues. Their vendor’s recommendation: add more power.

We tuned instead — two rounds of optimization plus a SQL Server 2022 migration took them from 16 cores to 4. Their customer count increased. Their licensing bill dropped by six figures.

Key Takeaways

  • 16 cores → 8 → 4 in two tuning rounds — each round cut cores in half while handling more workload.
  • Two 16-core servers (Always On AG) became two 4-core servers — 32 total cores down to 8, with high availability preserved.
  • Configuration, maintenance, and query optimization — not hardware upgrades — drove the reduction.
  • SQL Server 2022 migration contributed to the second round of core reduction.
  • SQL licensing savings alone approached six figures — list price for Enterprise is ~$15K per 2-core pack. Cut 24 cores and the math is obvious.
  • “Add more power” is the most expensive wrong answer in SQL Server performance.

We did a SQL Server Check Assessment. Three categories of problems surfaced:

  • Configuration issues. Parallelism settings that create thread contention, memory allocation that didn’t match the workload, TempDB layouts misaligned with the core count. Default settings on a production server are a reliable source of wasted CPU — and every wasted cycle is spend.
  • Missing maintenance. Stale statistics meant the optimizer was choosing bad plans confidently. Degraded indexes meant more I/O than necessary. No consistency checks meant corruption risk sitting undetected. Skipping maintenance turns a well-configured server into a sluggish one over time.
  • Inefficient queries. Missing indexes, unnecessary scans on large tables, suboptimal execution plans — the kinds of problems that make a server look CPU-starved when it’s actually just doing unnecessary work.

None of these required more hardware. All of them required attention.

Round 1: 16 Cores to 8

We addressed configuration and maintenance first — the changes that affect every query on the server without touching application code.

After fixing configuration issues and implementing proper maintenance procedures, CPU utilization dropped enough to cut cores in half.

We validated each downsizing step under production-like load, watching top CPU queries before and after. The 16-core instance moved to 8 cores with equal or better performance.

This is the pattern we see repeatedly: a significant portion of CPU usage on most SQL Servers isn’t workload — it’s waste. Fix the waste and the hardware requirement shrinks.

Round 2: 8 Cores to 4

The second round focused on query-level optimization and a migration to SQL Server 2022.

Query tuning targeted the highest-resource consumers in the workload — the queries responsible for the most CPU, the most reads, the most execution time. Optimizing even a handful of top offenders can dramatically change the server’s resource profile.

The SQL Server 2022 migration also contributed — but only after we raised compatibility level to 160 and validated plan behavior.

Features like Parameter Sensitive Plan optimization (PSP) require compat 160; upgrading binaries alone doesn’t unlock them.

Once enabled, engine-level improvements — Intelligent Query Processing, better cardinality estimation, PSP — reduced CPU for certain query patterns without code changes. The magnitude varies by workload, but in this case the combination of query tuning and engine improvements was enough to cut cores in half again.

Eight cores became four. Performance improved. The customer count on the platform increased.

Full Picture: 32 Cores to 8

The client was running Always On Availability Groups — two servers for high availability. Both were 16-core instances. Both went through the same optimization process.

Two 16-core servers became two 4-core servers. Thirty-two total cores became eight. High availability stayed intact. The workload grew.

Licensing Math

SQL Server 2022 Enterprise lists at about $15,000 per 2-core pack (discounts vary by agreement, Azure Hybrid Benefit, and whether you’re on perpetual + SA or subscription/PAYG). The reduction:

  • Before: 32 cores total (2 servers × 16 cores) = 16 two-core packs
  • After: 8 cores total (2 servers × 4 cores) = 4 two-core packs
  • Reduction: 12 two-core packs at list price = significant six-figure licensing delta

We took both nodes down to 4 cores — the per-VM licensing minimum — so the configuration is as lean as it can sensibly go.

Whether the savings show up as reduced perpetual license capex or lower subscription/PAYG spend depends on the licensing model. Either way, cutting 24 cores out of your SQL Server footprint is a linear cost reduction. Between licensing and smaller VM sizes, total savings landed in the low six figures.

The vendor’s recommendation — more cores — would have moved costs in the opposite direction.

Why “Add More Power” Is the Wrong Default

When SQL Server performance degrades, the organizational instinct is to scale up. It’s fast, it’s easy to approve, and it doesn’t require anyone to investigate what’s actually happening.

But scaling up doesn’t fix:

  • Configuration settings that waste CPU on every query
  • Stale statistics that cause the optimizer to choose bad plans
  • Missing indexes that force unnecessary scans on large tables
  • Queries that consume 10x the resources they should

Scaling up just runs the same waste on a bigger machine. You pay more, and the underlying problems remain — ready to surface again when the workload grows.

The harder path — investigate, diagnose, fix — takes longer. But it’s the only path that reduces costs while improving performance.

When to Tune vs. When to Scale

Not every server can be tuned down to 25% of its original cores. This result required specific conditions:

  • Access to the workload. We could analyze and optimize queries. If you’re running a sealed vendor application with no ability to modify queries or add indexes, your tuning options are limited (though configuration and maintenance improvements still apply).
  • A configuration that had never been reviewed. Default settings on a production server are a reliable source of wasted resources. If someone has already optimized your configuration, the gains from that step will be smaller.
  • Maintenance that didn’t exist. A server running for years without statistics updates or index maintenance has accumulated significant performance debt. Paying that debt back delivers large, immediate improvements.
  • Workload characteristics that responded to tuning. OLTP workloads with many small queries and predictable access patterns tend to benefit most from indexing and optimization. Analytical or warehouse workloads with unavoidable large scans may genuinely need the cores.

If you’ve already tuned configuration, maintained statistics, optimized your top queries, and CPU is still high — then scaling is the right answer. Scale because you’ve confirmed the workload needs it, not because nobody looked.

Bottom Line

The client was told to add more power. We removed waste instead.

Sixteen cores became four. Two 16-core HA servers became two 4-core servers. Customer count went up. Licensing costs dropped by six figures.

Fast systems are never an accident. They’re the result of someone actually looking at what’s happening inside the database.

Frequently Asked Questions

Can SQL Server performance tuning really reduce cores by 75%?

It depends on how much waste exists. Servers with default configuration, no maintenance, and unoptimized queries often use 2–4x more CPU than necessary. A 75% reduction is exceptional but not impossible when all three categories have significant room for improvement.

What’s the first thing to check on an underperforming SQL Server?

Configuration, maintenance, and top resource-consuming queries — in that order. Configuration changes affect every query immediately. Maintenance (statistics, indexes) fixes optimizer decisions server-wide. Query optimization targets the biggest individual offenders.

Does upgrading to SQL Server 2022 automatically improve performance?

Not automatically. Key features like Parameter Sensitive Plan optimization (PSP) require database compatibility level 160 — upgrading binaries alone won’t enable them. Once compat level is raised and plan behavior is validated, engine improvements like Intelligent Query Processing and better cardinality estimation can reduce CPU for certain query patterns without code changes. Upgrading alone isn’t a tuning strategy, but it can amplify the results of proper optimization.

How much does SQL Server Enterprise licensing cost on Azure?

List price for SQL Server 2022 Enterprise is about $15,000 per 2-core pack, though actual cost varies by agreement type, Azure Hybrid Benefit eligibility, and whether you’re on perpetual + SA or subscription/PAYG. Cutting cores has a direct, linear impact on licensing spend — which is why tuning often pays for itself many times over.

Should I tune first or scale first?

Tune first. Scaling masks inefficiency and increases spend. Tuning reduces waste and often reveals that the workload needs far less hardware than assumed. Scale after tuning confirms the workload genuinely requires more resources.

Speak with a SQL Expert

In just 30 minutes, we will show you how we can eliminate your SQL Server headaches and provide 
operational peace of mind

Article by
Saulius Baskevicius
Hey, I’m Saulius, part of the team behind Red9. SQL Server is my thing. Complex challenges - my passion.

Discover More

SQL Server Health Check SQL Server Migrations & Upgrades SQL Server Performance Tuning SQL Server Security SQL Server Tips

Discover what clients are saying about Red9

Red9 has incredible expertise both in SQL migration and performance tuning.

The biggest benefit has been performance gains and tuning associated with migrating to AWS and a newer version of SQL Server with Always On clustering. Red9 was integral to this process. The deep knowledge of MSSQL and combined experience of Red9 have been a huge asset during a difficult migration. Red9 found inefficient indexes and performance bottlenecks that improved latency by over 400%.

Rich Staats 5 stars
Rich Staats
Cloud Engineer
MetalToad

Always willing to go an extra mile

Working with Red9 DBAs has been a pleasure. They are great team players and have an expert knowledge of SQL Server database administration. And are always willing to go the extra mile to get the project done.
5 stars
Evelyn A.
Sr. Database Administrator

Boosts server health and efficiency for enhanced customer satisfaction

Since adding Red9 to the reporting and DataWarehousing team, Red9 has done a good job coming up to speed on our environments and helping ensure we continue to meet our customer's needs. Red9 has taken ownership of our servers ensuring they remain healthy by monitoring and tuning inefficient queries.
5 stars
Andrew F.
Datawarehousing Manager
See more testimonials