Pre-fetching in Rails

Pre-fetching, firing off a query just to fill up the first level cache, is a classic Hibernate optimization. You can now also do it in Rails with
this plugin
. This fills a gap when outer join fetching becomes too complex or the cartesian product bites you (the result of outer joins is the cartesian product of all involved tables, which grows exponentially).

Leave a Reply