A backend engineer shares a production incident where an appointment-fetching endpoint worked fine in dev and QA but caused 4-second response times in production. The issue was an N+1 query problem: the code made 6,000+ individual database calls to fetch patient details. The solution involved batching patient data retrieval
Sort: