Re:Understanding N + 1 queries problem
by funnyfoobar on Tuesday January 03, 2023 @06:15AM
(#34230151)
Somewhat deviating, but relavent. If we use counter cache that is to keep vote_count on comments table, the include(:comments) solution would work fine.
https://scoutapm.com/blog/how-to-start-using-counter-caches-...