Hi,

I want to insert many records into a database. If I do them one-by-one,
it takes a long time. Does Rails have a method to optimize this --
creating a single SQL command for many records, maybe? The entries I
want to enter are all children to a single parent. Creating an array
children_array of the child objects is fast; it's when I do

children_array.each do |child|
  children<<child
end

that it takes a long time. (Here children is the name of the table that
has child objects.)

Thanks!
- Farmer
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to