Database optimization · Performance engineering · PostgreSQL / MySQL

The database is slow. The cause is rarely where you look.

We optimize existing databases under real load: queries, indexes, locks, configuration and the application's access patterns. Every change is measured, prioritized and rolled out with a fallback path.

01Diagnosis

Where time and resources are actually lost.

02Action plan

Prioritized by impact, risk and effort.

03Proof

Latency and load measured before and after.

The new bottleneck

Any AI can suggest an index today. Whether it saves your production system is another matter.

AI assistants read a query plan and recommend an index – for the one query you show them. In production, the interplay decides: a new index speeds up reads and slows down writes, a rewritten query shifts the load, a configuration change helps during the day and hurts the nightly batch. Without measurement under real load, every optimization is a guess.

On your own with AI

Understand individual queries, have query plans explained, collect index ideas and rewrites.

With XOR

Diagnosis under production load, a prioritized action plan and changes with measurement, rollback and handover to your team.

Performance loop

Observe. Explain. Change. Prove.

Every measure starts with a measurement and ends with one. In between is an explanation of why it should work.

  1. 01ObserveWorkload, wait times, p95/p99
  2. 02ExplainPlans, locks, resources
  3. 03ChangeIndex, query, schema, config
  4. 04VerifyLoad test and production
Levers

Where we come in.

Queries and indexes

Query plans, index strategy, statistics and rewritten queries for the workloads with the highest total load.

Locks and transactions

Lock contention, long transactions, deadlocks and isolation levels that create wait time instead of compute time.

Configuration and resources

Memory, connections, pooling, I/O and maintenance processes like autovacuum, tuned to hardware and load.

Schema and data volume

Partitioning, archiving, data types and denormalization where growth has outpaced the access paths.

Application and data access

N+1 queries, ORM patterns, caching and batch processing – often the biggest lever outside the database.

Scaling

Read replicas, connection pooling and load distribution when a single instance truly hits its limit.

Approach

Biggest lever first.

  1. 01

    Define symptom and target

    Which endpoints, reports or jobs are too slow, how often, and what latency is the target?

  2. 02

    Measure the workload

    Statistics across all queries, wait times and resources show where the total load actually comes from.

  3. 03

    Prioritize measures

    Impact, risk and effort are weighed against each other. Quick, safe wins come first.

  4. 04

    Change with a fallback path

    Every change is tested, rolled out under observation and verified against the baseline measurement.

Honest fit

When it's worth it. And when it's not.

Worth it when …

latency costs you revenue or users, load spikes cause outages, cloud costs grow with your data, or a hardware upgrade would only shift the symptom.

Probably not when …

the cause demonstrably lies outside the database, a single known query is the problem and your team can fix it, or the system is about to be replaced.

FAQ

Before the first measurement.

Can't an AI assistant optimize our queries?

For individual queries, often well, and your team should use it. Production bottlenecks, however, arise from the interplay of load, locks, schema and application. That can only be judged by measuring the system – and changes need a way back.

Isn't more hardware enough?

Sometimes, in the short term. But inefficient queries and locks scale along with it; more hardware shifts the problem and raises costs. A targeted change often does more than the next instance size.

Do you need production access?

For reliable statements about load, usually read access to statistics and metrics. We generally don't need the contents of personal data for that.

References

Foundations.

Next step

Which slow process is costing you the most right now?

30-minute first meeting