This project is archived and is in readonly mode.

#2820 ✓hold
ransom-briggs (at uiowa)

AR::Base.find_every should support :preload => false option

Reported by ransom-briggs (at uiowa) | June 19th, 2009 @ 10:53 PM | in 2.x

When doing an :include, the preload_associations method of pulling the included object takes significantly longer as data sizes go up - it went from 35 percent slower to 45 percent slower to 55 percent slower as I doubled the dataset size.

Could you please add an option to force the include to use find_with_associations instead of preload_associations? Right now we include a condition that uses the joined table that we know is always true that forces it - but this is not our preferred solution.

So find_every would end up being something like this

 if include_associations.any? && (references_eager_loaded_tables?(options) || options[:include_join])

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Tags

Pages