Skip to main content

Walk a Slow Query From Symptom to Fix

Diagnose a slow query by moving from user symptom to plan evidence before changing indexes.

databases-explained5 min read

Production symptom Customers page alternates between 120 ms and 9 seconds during sales-demo hour. Intermittent database slowness usually means parameter shape, lock waits, cache state, or plan choice. Guessing from the endpoint name is not evidence. EXPLAIN discipline Scope -> Plan -> Cardinality -> Smallest fix The goal is to identify the expensive mechanism before adding weight to the database. Reflex Add an index on the first column mentioned. A fix tied to the observed bottleneck, not a hopeful tuning change. Plans are explanations of work. Treat each step as a hypothesis about rows and cost. Scope the symptom First…

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Contact us