TL;DR. Three prod slowdowns in one week. A 30-second timeout that was secretly TWO MINUTES. A math library we shipped twice to students who don't even have math. And a dashboard that built tens of thousands of objects just to draw a few hundred rows. Not one of them was a slow algorithm. The cause was never where I looked first.
We run Equip (open-source LMS: FastAPI + React + Supabase Postgres). I spent a week chasing latency, and the slow-query log lied to me every single time. Every fix lived UPSTREAM of the code that looked slow. Here's the wall of shame.
1. The 30-second timeout that was actually two minutes
I was sure we had a 30s statement_timeout. I set it the obvious way:
# looks right. does absolutely nothing in prod.






