Node.js · Middle · Question 47 of 75

What is the N+1 query problem?

Explanation

For 100 posts it means 101 queries. Fix it with a JOIN, WHERE id IN (...) or batching (e.g. DataLoader in GraphQL).

Further reading

Problem with a question

Node.js · Middle · question 47

Test yourself

Take the Node.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz