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.
Where time and resources are actually lost.
Prioritized by impact, risk and effort.
Latency and load measured before and after.
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.
Understand individual queries, have query plans explained, collect index ideas and rewrites.
Diagnosis under production load, a prioritized action plan and changes with measurement, rollback and handover to your team.
Observe. Explain. Change. Prove.
Every measure starts with a measurement and ends with one. In between is an explanation of why it should work.
- 01ObserveWorkload, wait times, p95/p99
- 02ExplainPlans, locks, resources
- 03ChangeIndex, query, schema, config
- 04VerifyLoad test and production
Where we come in.
Query plans, index strategy, statistics and rewritten queries for the workloads with the highest total load.
Lock contention, long transactions, deadlocks and isolation levels that create wait time instead of compute time.
Memory, connections, pooling, I/O and maintenance processes like autovacuum, tuned to hardware and load.
Partitioning, archiving, data types and denormalization where growth has outpaced the access paths.
N+1 queries, ORM patterns, caching and batch processing – often the biggest lever outside the database.
Read replicas, connection pooling and load distribution when a single instance truly hits its limit.
Biggest lever first.
- 01
Define symptom and target
Which endpoints, reports or jobs are too slow, how often, and what latency is the target?
- 02
Measure the workload
Statistics across all queries, wait times and resources show where the total load actually comes from.
- 03
Prioritize measures
Impact, risk and effort are weighed against each other. Quick, safe wins come first.
- 04
Change with a fallback path
Every change is tested, rolled out under observation and verified against the baseline measurement.
When it's worth it. And when it's not.
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.
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.
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.
Foundations.
- [PostgreSQL]PostgreSQL Global Development Group: Using EXPLAIN, official documentation.
- [MySQL]Oracle: MySQL 8.4 Reference Manual: Optimization.
- [Winand]Markus Winand: Use The Index, Luke! – SQL Indexing and Tuning.