You know, your article leaves me *really* confused. You say (at the very end): "Now, just to be perfectly clear, both of these patches affect only the pre-query."
Just before that you say: "I've also written a non-destructive patch which solves my immediate performance concerns by collecting the names of tables that are referenced in :conditions and then only eagerly joins the necessary tables (in the pre-query)." Forgive me if I'm getting the wrong end of the stick here but doesn't AR already do that? Album.find(:all, :limit => 10, :include => :songs) # no joins in prequery, no conditions in prequery Album.find(:all, :limit => 10, :include => :songs, :conditions => 'albums.active = 1') # no joins in prequery, conditions in prequery Album.find(:all, :limit => 10, :include => :songs, :conditions => 'songs.active = 1') # join in prequery, conditions in prequery What am I missing? Or to put it another way, why is your "non- destructive-patch" required in light of current behavior? Regards, Trevor On 12-Sep-07, at 6:36 PM, dasil003 wrote: > > I have written up a lengthy explanation of my patch. I would > appreciate any and all reviewers to read it and give their opinion. > This will take a big mobilization to push through, but I think it is > well justified. Please read my opinion at: > > http://darwinweb.net/article/ > Optimizing_And_Simplifying_Limited_Eager_Loading_In_Activerecord > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
