2/30 Days System Design Questions!
A classic N+1 query problem is presented: a /orders endpoint fires 51 DB queries per request due to ORM lazy-loading customer data. Four solutions are compared — eager loading with a JOIN (Prisma include), DataLoader batching, Redis caching, and denormalization — each with different trade-offs for future scalability. The post frames it as a team debate exercise rather than providing a definitive answer.