Just figured out that ActiveRecord 2.2 generatesSQLfor
Company.find(:all, :include = :people)as something like
SELECT FROM companySELECT person. FROM person WHERE person.id in (…)In 2.1.x, it used to generateSQLas something like
SELECT * FROM company LEFT OUTER JOIN person ON person.company_id = company.id
It seems for the sake of performance…the current statements return smaller data set. However,it couldgenerate a very longSQLstatement if you have lots of ‘people’ in this case, and thus spend longer to parse andexecute.
And…WHEN did this change happen? I’m wondering…