The N+1 Problem Is Bigger Than Queries
How “Calls per Request” helps you catch hidden performance and cost bugs early Most “slow apps” are not slow because the database is bad. They are slow because a single request quietly triggers far more work than anyone expects. This pattern is commonly known as N+1 queries , but in real systems it goes beyond databases. It becomes N+1 work . And once it shows up, it hurts performance, reliability, and cloud cost at the same time. This blog explains what N+1 work looks like, why it is dangerous, and how to prevent it using one simple measurement: calls per request . 1) What N+1 work actually is N+1 happens when something that should happen once happens N times , usually because it sits inside a loop. A classic example: You fetch 100 orders. For each order, you fetch customer details. That becomes 1 query for orders + 100 queries for customers. But the same pattern appears outside the database too: One API request triggers 1 service call, then 3...