Database performance rescue for Stridewell
Diagnosed and fixed PostgreSQL bottlenecks that were timing out the busiest pages. A case study by Tomasz Kowalczyk, Backend Engineer (Go & PostgreSQL).
Challenge
Stridewell, a running shoe retailer, saw pages time out every Monday morning when usage peaked. The team had doubled the database size twice and the problem kept coming back.
Solution
I analysed slow-query logs and query plans, added five targeted indexes, rewrote the three worst queries, removed an N+1 pattern in the ORM and introduced a read replica for reporting. The database was then sized back down.