Database query & performance optimisation
A slow database is often the real problem behind a slow product and a large cloud bill. We find the queries doing the damage and fix them, with benchmarks before and after and a rollback plan for every change.
| Query | Before | After |
|---|---|---|
SELECT … FROM orders WHERE merchant_id=? AND status=?Composite index (merchant_id, status, created_at) | 3.8s | 42ms |
Loan ledger monthly statementRewrite + range partition by month | 52s | 1.9s |
Campaign dashboard aggregatesPre-aggregated summary table | 11.2s | 120ms |
Payment reconciliation jobBatched upserts, removed row-by-row loop | 47min | 3min |
Everything you need, nothing you don't
Slow-query forensics
Workload profiling using slow logs, pg_stat_statements, Performance Insights and execution plans. We rank queries by total impact, not just how slow each one is.
Indexing strategy
Composite and covering indexes where they help, and removal of redundant ones that slow down writes.
Query & ORM rewrites
We remove N+1 patterns, replace correlated subqueries and fix ORM-generated SQL that doesn't scale.
Schema & partitioning
Partitioning, archival of cold data, the right data types and normalisation where it pays off.
Engine & connection tuning
Buffer pools, work memory, connection pooling (PgBouncer, ProxySQL) and replica routing.
Right-sizing after the fix
Once the load comes down, we resize instances. Many clients drop one or two instance tiers.
How an engagement runs
Health check
Read-only access to metrics and slow logs. Within 48 hours you get a ranked list of problem queries.
Fix plan
Each fix is estimated for impact, risk and effort. You approve what we ship.
Implement & benchmark
Changes go to staging first, with before/after numbers on production-like data.
Roll out & verify
We deploy in a controlled way with rollback ready, and monitor p95 latency and CPU.
Guardrails
Query review checks in CI, plus dashboards and alerts so regressions are caught early.
We tune the databases you already run
You don't need to re-platform to get faster. We work with your current engine and hosting, managed or self-hosted.
Frequently asked questions
Do you need write access to our production database?
No. The health check uses read-only access to metrics, slow-query logs and execution plans. Changes are applied through your normal deployment process, or by us with your approval and a rollback plan.
Which databases do you work with?
MySQL, MariaDB, PostgreSQL, MongoDB and SQL Server, self-hosted or managed (Amazon RDS, Aurora, Cloud SQL, AlloyDB), plus warehouses like BigQuery and Redshift.
How much faster will our queries be?
It depends on the workload. Missing indexes and inefficient queries often give order-of-magnitude improvements on the worst queries. The health check tells you what to expect before you commit.
Will optimisation reduce our cloud bill?
Often, yes. Less CPU and I/O usually means you can run smaller instances or fewer replicas. We combine this with our cloud cost reduction service when it makes sense.
Often paired with
Cloud cost reduction
We right-size, set up commitments, remove waste and tune architecture. We charge 20% of what we save you, and nothing if we don't.
Learn more arrow_forwardMonitoring with WhatsApp, SMS & email alerts
Dashboards, SLOs and alerts that reach on-call engineers on WhatsApp, SMS and email, with escalation.
Learn more arrow_forwardApplication architecture guidance
Architecture reviews, scaling plans and written design decisions, so you build the right thing the first time.
Learn more arrow_forwardGet a free 48-hour database health check.
An engineer, not a salesperson, will reply within one business day. Database health checks are free for qualifying production workloads.