When I call destoy_all on a model with a where clause AR iterates though each record in the recordset and calls destroy on each item. This seems highly inefficient to me. Wouldn't it be better to call delete from child records where foreign_id in (parent ids)?
In other words shouldn't destroy all destroy all the children for all the items in one shot? I am having to manually do destroy all on my children when I have large number of records to delete so I am wondering if there is a more elegant way of handling this. Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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-talk?hl=en.

