redis_on_rails icon indicating copy to clipboard operation
redis_on_rails copied to clipboard

How to load associated event records eagerly?

Open codeablehq opened this issue 11 years ago • 2 comments
trafficstars

When storing event objects in redis that have ids of related records, they get lazily loaded, but the problem is when showing a list of events with related records then each record is loaded fresh from DB, creating a ton of N+1 queries.

Any tips on how to get around it?

codeablehq avatar Aug 27 '14 08:08 codeablehq