Try to use bulk insert for save all of your instances.
http://www.igvita.com/2007/07/11/efficient-updates-data-import-in-rails/

On Jun 12, 6:14 am, Nick <[email protected]> wrote:
> Hi guys. On my laptop, I'm finding that it's taking about 5 minutes to
> save 25,000 model instances.
>
> The model has 5 validations, and I'm saving all of the model instances
> in a single transaction:http://pastie.org/509281
>
> 25,000 model instances is a lot, but 5 minutes seems too long. Any
> suggestions for how to speed this up?
>
> Thanks,
> Nick

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