N+1 Antipattern

The N+1 query antipattern happens when a query is executed for every result of a previous query, like a join.

The query count is N+1, with N being the number of queries for every result of the initial query. If that initial query has one result, N+1 = 2. If it has 1000 results, N+1 = 1001 queries.