Part 2: The index we were missing
The slow page ran eleven queries, and one of them scanned the whole table on every request. The query plan said so in plain words; we had simply never asked.
- Read the query plan before adding an index
- Put the most selective column first
- Make every migration idempotent
- Back up before, verify after
Printed this out for our next retro. Really useful framing.
Printed this out for our next retro. Really useful framing.
Good question. It took about three weeks, most of it waiting for review and measuring the results.
Bookmarked. The part about writing things down before changing anything is underrated.
This matches our experience almost exactly, down to the part where the slow tail took longest to fix.