If you're inserting a lot of rows, it can also be helpful to wrap the
whole operation in an ActiveRecord::Base#benchmark call, like so:

Quote.benchmark("Inserting stuff") do
  # insert stuff
end

This makes your log file more readable, and saves a lot of time (not
generating all the log entries).

--Matt Jones

On Mar 4, 3:51 pm, Greg Donald <[email protected]> wrote:
> On Wed, Mar 4, 2009 at 10:56 AM, zdennis <[email protected]> wrote:
> > If you know of a way to mold sqlite for efficient importing of data I
> > am all ears.
>
> Wrap your inserts in a transaction.
>
> --
> Greg Donaldhttp://destiney.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