Making Postgres 42,000x slower
Making PostgreSQL 42,000 Times Slower Via Configuration Tuning
Discover the exact configuration parameters required to take a highly optimized PostgreSQL instance and reduce its transaction throughput by over 42,000 times, demonstrating granular control over database I/O and background processes.
Short Summary
- Dropped baseline transaction throughput (7,082 TPS) to under 0.1 TPS by exclusively modifying PostgreSQL configuration settings.
- Caching strategy was destroyed by shrinking shared buffers from 10GB to 2MB, forcing heavy disk reads.
- Background maintenance tasks (autovacuum and WAL checkpoints) were hyper-aggressive, forcing excessive I/O interruptions.
- Index usage was systematically disabled by manipulating query planner heuristics regarding random access costs.
This session reviews a challenge where the goal was achieving maximum database latency by only editing parameters in the postgresql.conf file. The speaker details the step-by-step configuration changes targeting caching, vacuuming, Write-Ahead Logging (WAL), and query planning costs, resulting in a nearly unserviceable database environment in controlled testing.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Related videos
Maybe we were wrong
The PrimeTime
309.2k views
Ticking Timebomb in Mac OS
The PrimeTime
149.5k views
"I suck" -ThePrimeagen
The PrimeTime
55.8k views
AI Coding Sucks | Prime Reacts
ThePrimeTime
245.8k views
Things are breaking down
ThePrimeTime
48.7k views
I'm switching languages again...
ThePrimeTime
165.4k views
AI Makes you Dumb and Slow
ThePrimeTime
151.6k views
Why is the Rust Compiler So SLOW?
ThePrimeTime
98.2k views
Why Does Software Keep Breaking?
ThePrimeTime
184.4k views
The Who Cares Era
ThePrimeTime
139.0k views
Top Comments (10)
Fun fact: The article is a better documentation of the config file than the Postgres default docu…
How to be successful. When creating a database, set these as the initial configurations. Then, after it is deployed, say you are going to "optimize" it, remove the configurations, add to your resume how you made the database 42000x faster. Get a promotion, etc.
This guy knows where the performance is, by knowing where it isn't
Finally, 0.00002x engineer
this is more advanced than putting random sleep command in the codebase, I'll be using this to proclaim that I improved the performance to my boss!
Good article. Now I can make sure to use all these tips and tricks at work to make things worse for everyone.
This should absolutely be an esport!
yes, finally! I'm tired of everyone trying to help me optimize my pgdb and no one helping me enshitify it
Postgres's got to be one of the most fascinating technologies developed in this century. It is a masterpiece in modern engineering
Honestly, this is a really really good way to learn something.
Unlock the Data Inside
Turn Videos into Knowledge
- Get FREE 10/day: transcripts, summaries, chats
- Chat with videos, export text & PDF
- $1 free API credit for RAG, chatbots & research
Free forever plan • All features unlocked
Top Comments (10)
Fun fact: The article is a better documentation of the config file than the Postgres default docu…
How to be successful. When creating a database, set these as the initial configurations. Then, after it is deployed, say you are going to "optimize" it, remove the configurations, add to your resume how you made the database 42000x faster. Get a promotion, etc.
This guy knows where the performance is, by knowing where it isn't
Finally, 0.00002x engineer
this is more advanced than putting random sleep command in the codebase, I'll be using this to proclaim that I improved the performance to my boss!
Good article. Now I can make sure to use all these tips and tricks at work to make things worse for everyone.
This should absolutely be an esport!
yes, finally! I'm tired of everyone trying to help me optimize my pgdb and no one helping me enshitify it
Postgres's got to be one of the most fascinating technologies developed in this century. It is a masterpiece in modern engineering
Honestly, this is a really really good way to learn something.