> > Actually, the constraint involved another join as well. > > The schema looks like: > > role <- roles_users -> users -> order_transactions > -> accounts > > The constraint and join I removed was on the role name. The other > constraint is on order_transactions.creation_date. There is only one users > record involved. The 3,500 records are the order_transactions. >
Interesting. I wonder if it was returning roles & users as well, and instantiating them all? Or at least the users? Because depending on what was initially happening, that would mean that by dropping the constraint you could have reduce the number of AR instantiations (expensive) by half or 2/3. -Kevin > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby > -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
