N+1 Query Problem
What is the N+1 Problem?
The N+1 problem is a common performance anti-pattern in database access where an application executes 1 query to fetch a list of parent records, then N additional queries to fetch related data for each parent — resulting in N+1 total queries instead of a constant number.