Databases & SQL

N+1 Query

/en plʌs wʌn ˈkwɪəri/

Definition

A performance anti-pattern where loading N items triggers N additional database queries instead of a single join.

Example in context

"50 orders, 50 separate customer queries — classic N+1. Fixed it with an eager-load JOIN."

Practice this term

Master N+1 Query in context by working through exercises in the Databases & SQL module. You'll see the term used in real engineering scenarios with multiple-choice, fill-in-the-blank, and matching drills.

Frequently Asked Questions

What does "N+1 Query" mean?

A performance anti-pattern where loading N items triggers N additional database queries instead of a single join.

How do you pronounce "N+1 Query"?

"N+1 Query" is pronounced /en plʌs wʌn ˈkwɪəri/.

Can you use "N+1 Query" in a sentence?

"50 orders, 50 separate customer queries — classic N+1. Fixed it with an eager-load JOIN."