I have two classes. User
and Review
(User has many reviews).
I am trying to find then best method to extract two random reviews from the association of User.reviews
I can use user.reviews.order("RANDOM()").limit(n)
but if I'm not mistaken this will be very heavy on the DB if I have users with a large number of reviews...
I am using Postgres as my database.
Thoughts?