I have an event table that has a has_many relation to user_events.
Currently it is being preloaded and then filtered according to attributes such as status etc.
I am wondering if instead of preloading the list and then filtering it, wouldn’t it be better to have separate queries for for the cases?
So then I could get the user_events by the event_id and the attribute I am looking for.
Instead of preloading and filtering just ask the database for the specific data I need.
What is your take on this?