A database that stays fast as your data grows
Your app slows down as the data grows, or one report holds everything up. I find the slow queries with real measurements, fix them with indexes, query changes, and schema fixes, and check the result on the same workload.
Signs your database needs tuning
- Pages and reports got slower as the tables grew
- One heavy query slows the whole app down
- The database server is busy even when traffic is low
- A batch job that handles a thousand records in one run takes too long or fails
What I do
Find the slow queries
I read query plans and slow-query logs to see which queries cost the most, so we fix those first.
Indexes and query rewrites
The right indexes, and rewritten queries where the plan shows wasted work.
Schema and data types
Fix table design and column types that make queries slower than they need to be.
Connections and caching
Connection pooling and caching in the right places, so the database does less repeated work.
Batch and bulk work
Tune jobs that process many records in one go, such as a thousand at a time.
The API in front of it
A fast database also needs a fast API. I build and tune Node.js APIs on Fastify.
See Fastify developmentRunning a PHP app on MySQL?
I also have a page for MySQL tuning on PHP apps, including WordPress and Laravel: MySQL database optimization for PHP apps.
How it goes
Measure
I capture slow queries and load on your real workload.
Rank
You get a list of fixes ordered by how much time each saves.
Fix
I test each change on a copy, then apply it with a backup in place.
Verify
We re-run the same workload and compare the numbers.
Questions about database optimization
How much does database optimization cost?+
It depends on the size of the database and how many queries are slow. Projects start from $5,000. After a short scoping call you get a written plan and a quote before anything is changed.
Which databases do you work with?+
PostgreSQL and MySQL. If you run something else, tell me and I say whether I am the right fit.
Will the work cause downtime?+
I test every change on a copy first and take a backup before it touches production. Most index and query changes need no downtime. If one does, I tell you before we start.
How do we know it worked?+
I measure the same queries and workload before and after, and give you both sets of numbers.
Send me your slow queries
Tell me what is slow and which database you run. I reply within 24 hours with questions or a plain answer on what I would measure first.
Related: Fastify development, MySQL for PHP apps, Product engineering.
Dalam Bahasa Indonesia: lihat halaman Bahasa Indonesia.