Glossary term
What is N+1 problem? Meaning for developers
In System Design
One query plus N more, one per item. Example: Loading 20 posts, then 20 separate author queries.
Learn it properly · System DesignLesson 5: SQL Basics Every System Designer NeedsBefore sharding, replicas or NoSQL, learn to use one relational database well. Tables and keys, the queries you will write every day, indexes and EXPLAIN, the N+1 trap, transactions, and the connection limit that takes databases down.In API Design
One query for a list followed by one more query per item, which can be fixed by batching the lookups.
Learn it properly · API DesignLesson 8: GraphQL and gRPC: When Not to Use RESTWhat problems GraphQL and gRPC solve, the real costs (N+1, caching, tooling), a small working example of each, and a decision table.