SQL N + 1 Query Problem
One complex SQL query is typically faster than an equivalent set of simple SQL queries. Extracting table rows in one query, and processing each row in additional queries, is slow. It is typically faster to instead do one equivalent complex query. This is referred to as the SQL N + 1 query problem.
Comments
Post a Comment