Oklahoma Data Partners

Oklahoma Data Partners Services

Database Performance Tuning

Find what is really slowing your database down, fix it, and prove the difference.

Database performance tuning makes slow applications and reports fast again by fixing the database underneath them. Tuning means finding exactly which queries, indexes, or settings are wasting time and correcting them, rather than guessing or buying bigger servers. Oklahoma Data Partners tunes SQL Server, Azure SQL, and PostgreSQL databases for companies across Oklahoma, measuring before and after so you can see what changed.

Performance Tuning

Before vs. after

Live

Before

8.4 s

After

1.2 s

~85% faster after tuning

Plain terms

Why is my SQL Server so slow?

When users say "the system is slow," the cause is usually inside the database, and usually one of a few things. A query is reading an entire table because the right index is missing. Two processes are blocking each other, so one waits for the other to finish. The database is reusing a plan built for a very different request. Or the server's memory and storage settings were never adjusted after installation. Hardware is rarely the first problem, even though it is often the first thing people buy.

A familiar example: an Oklahoma distributor's order screen takes eight seconds to load at month-end, and the warehouse team has learned to wait. Tuning reveals one report query, run every few minutes by a dashboard, scanning millions of rows and holding locks the order screen needs. A new index and a small rewrite remove the conflict, and the order screen returns to normal without new hardware.

What database performance tuning covers

Query tuning

Rewriting the queries and stored procedures that consume the most time and resources.

Index design

Adding missing indexes, removing unused ones, and fixing those that do more harm than good.

Blocking and deadlocks

Finding which processes are waiting on each other and why.

Configuration

Memory, parallelism, tempdb, and storage settings tuned for your workload.

Statistics and plans

Keeping the database's information about your data accurate so it chooses good strategies.

Cost reduction

Right-sizing servers and cloud tiers once the waste is removed.

Diagnosis

Blocking, deadlocks, and the most expensive queries

Blocking happens when one process holds a lock on data that another needs, so the second has to wait. It is normal in small doses and painful when long transactions or missing indexes stretch it out. A deadlock is two processes each waiting for the other; SQL Server resolves it by canceling one, which users see as an error.

To find what to fix, we look at what the server is actually spending time on. SQL Server records wait statistics and query history, and Query Store keeps the performance of each query over time. Sorting by total CPU, reads, and duration usually shows that a handful of queries account for most of the load. Those come first.

Missing indexes and parameter sniffing

An index works like the index in a book: it lets the database jump to the right rows instead of reading everything. SQL Server suggests missing indexes, but its suggestions need judgment, because too many indexes slow down inserts and updates. Parameter sniffing is when SQL Server builds a query plan for the first value it sees, for example a small customer, and then reuses that plan for a huge customer where it performs badly. Fixes range from query hints and plan guidance in Query Store to rewriting the procedure.

Decision

Tune the database or buy more hardware?

More hardware can hide a problem for a while, but an inefficient query on a bigger server is still inefficient, and in the cloud you pay for the waste every month. Tuning first tells you whether hardware is genuinely the limit. Often, after tuning, a server or cloud tier can be the same size or smaller, which is where cost savings come from. Sometimes the honest answer is that the workload has outgrown the server, and we will say so.

Cloud

Performance tuning and cloud costs

In the cloud, slow queries cost money twice: once in user time and again on the monthly bill. Azure SQL, Amazon RDS, and Google Cloud SQL charge by the size of the instance or tier, so a database forced to a bigger tier to cope with inefficient queries pays for that waste every month, indefinitely.

Tuning changes that equation. After the expensive queries are fixed and indexes are right, we look at actual resource use over a normal business cycle and recommend the smallest tier or instance that handles it with headroom. For Power BI and other reporting tools querying databases directly, we also check whether some of that load belongs in a separate reporting database or warehouse instead of the live system.

PostgreSQL

Tuning PostgreSQL

PostgreSQL has its own performance levers. We use pg_stat_statements to rank queries by total time, read EXPLAIN ANALYZE output to see how each query actually ran, and check autovacuum settings, because tables that are not vacuumed often enough bloat with dead rows and slow every read. Memory settings such as shared_buffers and work_mem, connection pooling, and index types suited to your data all come into play.

Whether the database is PostgreSQL on your own server or in Amazon RDS, Aurora, Azure, or Google Cloud SQL, the method is the same as with SQL Server: measure, find the biggest causes, fix them carefully, and measure again.

After tuning

Keeping performance from slipping back

Databases change. Data grows, new features are released, and reports are added, so a system tuned today can drift back to slow within months if nobody watches it. Every tuning engagement ends with a short plan to prevent that.

That plan usually includes regular index and statistics maintenance, alerts on long-running queries and blocking, Query Store settings that keep enough history to compare performance week to week, and a simple checklist for developers before they release new database code. Some clients run the plan themselves; others hand it to our remote DBA services so performance is monitored as part of routine care. Either way, you have a baseline to compare against, which makes the next slowdown much faster to diagnose.

Engagement

How a tuning engagement works

  1. 1

    Baseline

    We measure current performance: waits, top queries, and the user-facing problems you care about.

  2. 2

    Diagnose

    We trace slowness to specific queries, indexes, locks, or settings.

  3. 3

    Fix and test

    Changes are tested on a copy where possible and applied in agreed windows.

  4. 4

    Measure again

    We compare against the baseline and write up what changed and why.

A focused engagement on a handful of problem queries often takes a week or two. Broader tuning across a busy system runs longer. We agree the scope and timeline at the start. If you are not sure where the problem lies, a SQL Server health check is a good first step.

The Pipeline Story

Stage 4: keeping it fast

Performance tuning is Stage 4 work. It keeps the databases and data warehouse fast enough that data analytics and Power BI reports load in seconds instead of minutes. It is part of our database administration practice.

Local

Performance tuning for Oklahoma companies

Based in Oklahoma City, we tune databases remotely for companies statewide and come on-site in OKC and Tulsa when needed. Example cases might include ERPs (finance and operations software) slowing at month-end, healthcare and billing systems under heavy daytime load, energy data applications with large history tables, and Power BI reports querying live databases. Many of these systems were installed years ago by a vendor and have grown far beyond their original size without anyone revisiting indexes or settings. Vendor applications need particular care, because some changes can affect support agreements; we work within those limits, favoring index, statistics, and configuration fixes, and coordinate with the vendor when code changes are needed. For in-house applications, we work directly with your developers so fixes become part of how new code is written. Every change is documented and reversible, and nothing is applied to production without your approval and an agreed window.

Tools

Platforms and technologies we work with

SQL Server on-premises and on Azure or AWS virtual machines, Azure SQL Database, Azure SQL Managed Instance, Amazon RDS for SQL Server and PostgreSQL, Google Cloud SQL, and self-managed PostgreSQL. Tools include Query Store, Extended Events, dynamic management views, execution plans, and PostgreSQL's pg_stat_statements.

Questions

Frequently asked questions

Tired of waiting on slow databases?

Let's find the real bottlenecks and make your SQL Server fast again.

Schedule a Data Consultation