N+1 Isn’t a Rails Problem: It’s a Query-Shaping Problem
Copied SQL into Rails and still got N+1? Rewrote in ActiveRecord and still got N+1? The fix is a set-based mental model: where N+1 really comes from, how to verify it, and the AR patterns that eliminate it safely.
5 min read