Answer the question
In order to leave comments, you need to log in
How to solve the N+1 problem?
There are posts
And each post can be liked, that is, the following tables are obtained:
1) users
2) posts 3) likes (id
,
user_id, likeable_id, likeable_type)
or not?
Answer the question
In order to leave comments, you need to log in
1 request for a collection of posts
1 request for user likes on these posts
= 2 requests
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question