Techbanq

Databases · performance

Most slow databases need a diagnosis, not a bigger server

Upgrading the instance buys months and hides the cause. A tuning engagement starts from measurement — which queries cost the most user time, which indexes the workload outgrew, where the schema is carrying old decisions — fixes in order of return, and ends with the evidence that it worked.

Serving Saudi Arabia from our Riyadh office and our engineering hubs in Lahore and Karachi

Market
Saudi Arabia
Written for
CTO, CIO
Decision
Make an existing database fast again without rebuilding it or outsourcing it
Languages
EN · AR

Enterprise delivery credentials

  • ISO

    ISO/IEC 27001

    ISO/IEC 27001 certified

Certifications & registrations

The method

Five steps from a vague slowness to a measured improvement

The engagement is bounded on purpose: it starts with numbers, fixes in order of return, and ends with a handover rather than a dependency.

STAGE 01

Measure the workload as it is

Query statistics, slow-query logs and wait profiles are captured from production over a representative period, so the work starts from what the database actually does rather than what anyone believes it does. A baseline nobody can argue with.

STAGE 02

Rank the cost by user time

The most expensive query is not the slowest one; it is the one whose slowness, multiplied by its frequency, burns the most user time. Ranking by that product decides the order of work. A fix list ordered by return, not by noise.

STAGE 03

Fix from cheapest to deepest

Missing or wrong indexes first, then query rewrites, then the schema corrections that indexes were compensating for. Each change lands separately so its effect is attributable. Changes whose individual effect is known.

STAGE 04

Verify against the baseline

The same measurements are taken again under the same workload. Improvement is a number compared to a number, and anything that regressed is caught here rather than by users. Proof, in the same units as the complaint.

STAGE 05

Hand back with the headroom stated

The engagement closes with a written statement of how much growth the fixed database can absorb, which trends to watch, and which of today’s deferred issues will surface next. A team that knows when to call again — and why.

The cause

The slowness was designed in years ago, one reasonable decision at a time

Databases rarely slow down because something broke. They slow down because the workload drifted away from the assumptions the schema and indexes were built on: a table that was small when the index strategy was set, an access pattern the ORM introduced that nobody reviewed, a report added in year two that scans what year one never touched. Each decision was reasonable when it was made. The accumulation is what we call schema debt, and it explains why the fix is analytical rather than mechanical — the database is not sick, it is carrying history.

It also explains what this engagement is not. It is not ongoing care: once the debt is paid down, running the database day to day — backups, replicas, patching, the pager — is a different service, described under database management services. And it is not application tuning: when the measurements show the time being lost in the code, the caches or the calls between services rather than in the database, we say so, because that is performance engineering work and pretending otherwise would waste your budget on the wrong layer.

Scoping it

What decides whether the tuning takes weeks or a quarter

The engagement is bounded, but its size is not fixed. These are the variables that move it, so a quote can be read rather than taken on faith.

VariableEffect on priceWhy
How concentrated the pain isThe single biggest driver of durationWhen a handful of query shapes carry most of the cost, the work converges fast. When the cost is spread thinly across hundreds of shapes, each fix buys less and the engagement is honestly longer.
Whether schema changes are neededTurns days of index work into weeks of migration workIndexes and query rewrites land without touching the application. A schema correction touches migrations, code and deployment windows, and on a live system it must land in reversible steps.
A safe place to test the fixesIts absence adds setup time before tuning beginsChanges are proven on an environment with production-shaped data before they reach production. Where no such environment exists, building one is the first work package, not an optional extra.
How close to capacity the system already runsRaises the caution, and therefore the paceOn a database with comfortable headroom, a misjudged change degrades performance. On one running near its limits, the same change can tip it over — so every step is smaller and watched longer.

Ask any supplier quoting this

  • Which measurements will you take before changing anything, and will we see them?
  • How will each change be attributed to its effect, rather than the batch being judged as a whole?
  • What does the engagement end with — a report, or a dependency on you?

Our role

What the diagnostic fixes and what it leaves your engineers holding

  1. 01

    Findings your team can re-derive

    Every fix ships with the measurement that motivated it and the reasoning behind it, so the next slowdown is something your engineers can diagnose with the same method rather than a reason to call us.

  2. 02

    The measurement left running

    The query statistics and slow-query capture we set up for the diagnostic stay in place after it, so the baseline keeps updating itself and drift is visible before it is felt.

  3. 03

    An honest boundary on the finding

    If the measurements show the problem living in the application tier, or the real need being someone to run the database continuously, the report says which engagement that is instead of stretching this one.

Whether to spend the recovered headroom on growth or on deferring the next hardware upgrade is a business call and yours; we hand over the faster database, the evidence, and the watch-list that says when to look again.

Common questions

What buyers ask

Would upgrading to a bigger database instance solve this more cheaply?+

Sometimes, briefly. More memory and CPU raise the ceiling, and when a workload has genuinely outgrown its hardware that is the right spend. But when the slowness comes from missing indexes, expensive query shapes or schema debt — which is the common case — a bigger instance hides the cause while the cause keeps growing, and you meet it again at a larger size and a larger monthly bill. The diagnostic answers the question instead of guessing at it: the measurements show whether the database is out of capacity or out of tune, and the fix follows the evidence.

Is this a one-off engagement or do we end up needing you permanently?+

It is bounded by design, and the handover is built to keep it that way: the fixes come with their reasoning, the measurement stays running, and the closing report states the headroom and what will consume it. Some organisations then choose ongoing cover — backups, replicas, patching, on-call — because nobody in-house wants to own the database at night, and that is a separate managed service with its own shape, not a quiet extension of this one. The distinction matters because a tuning engagement that never ends has stopped being tuning and become an unpriced retainer.

The database metrics look healthy but users still complain the system is slow. Is this the wrong engagement?+

Possibly, and the first days of measurement settle it. When the database is answering quickly but the experience is slow, the time is being lost elsewhere — in the application code, in chatty patterns that issue hundreds of fast queries where one would do, in calls between services, or in what happens after the data returns. Chatty access patterns sit on the boundary and we do fix those, since the remedy is in how the database is queried. But when the evidence points into the application tier itself, we say so early and point you at performance engineering rather than billing database work against an application problem.

Next step

Scope it with us

A diagnostic proposal naming what will be measured, the order fixes will land in, and how the improvement will be proven.