You ship a /posts index page. It renders 50 posts, and for each one it shows the author's name with post.author.name. QA says the page is slow, and the logs are full of repetitive SQL.
What is this problem called, and why is it happening?
How would you detect it, in dev and in a running app?
How do you fix it, and what's the difference between the main fixing strategies?
Answer: N+1 queries






