PostgreSQL Consulting
I find out why your PostgreSQL database is slow and tell you exactly what to change.
Slow queries, indexing, autovacuum and bloat, connection pooling. RDS, Cloud SQL, Supabase, or self-hosted.
Fixed price. Written report with a prioritized fix list and expected impact, delivered in one week.
What the audit covers
- Use pg_stat_statements to find the queries with the highest total cost across your workload.
- Run EXPLAIN (ANALYZE, BUFFERS) on those queries: estimated vs. actual rows, cache hits vs. disk reads, where the time goes.
- Check indexes against how your application reads the data: missing, unused, and bloated indexes.
- Check autovacuum settings and dead tuple counts. Tables that autovacuum can't keep up with get slower without any query change.
- Review connection counts and pooling. Each PostgreSQL connection is a process, so too many connections slow everything down.
- Write a report: each problem, the exact change to make, and the expected effect, ordered by impact.
PgBouncer setup
Choosing a pooling mode and handling prepared statements and session features correctly in transaction mode.
Implementing the fixes
If you want help after the audit, I can make the changes with your team: indexes, query rewrites, autovacuum tuning. Scoped and priced separately.
Managed PostgreSQL limits
RDS, Cloud SQL, and Supabase restrict settings and connections in different ways. Recommendations account for the platform you're on.
Experience with PostgreSQL internals
I maintain a fork of pgzx, a library for writing PostgreSQL extensions in Zig. My work there covers built-in type conversions, composite types through HeapTuple and TupleDesc, item pointers, and atomic and spinlock helpers for shared memory. I wrote about it in Learning Postgres extensions as a Zig developer.
Frequently asked questions
How is PostgreSQL consulting priced?
The performance audit is fixed-price and delivered in one week. Implementation work after the audit is scoped and quoted separately.
How does payment work?
50% to start, 50% when the report is delivered. A one-page agreement covers scope and dates. You can pay by bank transfer or card.
What do you need from us?
Read-only access to the database or its metrics, pg_stat_statements enabled (or permission to enable it), the schema, and a short call about which parts of the application feel slow.
Do you work with RDS, Cloud SQL, or Supabase?
Yes. The diagnosis is the same as self-hosted PostgreSQL. The fixes differ because each platform limits which settings you can change and how many connections you get.
Can you help with PgBouncer?
Yes. I review how your application uses connections, pick the pooling mode, and help roll out the configuration.
Related services