Card 05/ 06

ExerciseDifficulty: Advanced1 min

Diagnose the Report

A support ticket says: "the rides list page is slow, especially when there are a lot of results." No other detail. What's the first thing to actually do — not the first thing to try fixing?

See the answer

Measure it — turn on query logging or check existing metrics for that endpoint and see what's actually happening. "Especially with a lot of results" is a strong hint toward N+1 specifically, since its cost scales with the row count, but a hint is not a diagnosis: confirm it in the query log before touching the code that seems responsible.