On 4/4/06, Nathan Kurz <[EMAIL PROTECTED]> wrote:
>
> On Tue, Apr 04, 2006 at 04:18:35PM -0700, Sripathi Raj wrote:
> > On 4/4/06, Nathan Kurz <[EMAIL PROTECTED]> wrote:
> > >
> > > > >> 3. The performance for inserts is really bad. Around 40k entries
> > >         takes a
> > > > >>    few hours. What might I be doing wrong? I do a commit after
> > > > >>    all the inserts.
> > >
> > > That doesn't seem right for speed.  In addition to using "commit", are
> > > you beginning a transaction with "begin"?  Are your inserts
> > > particularly complex or large?  More details about what you are doing
> > > would probably be good here, since something odd is happening here.
> > > Maybe you could post a tiny test program along with the time it takes?
> >
> > I don't begin the transaction with begin. My assumption was that the
> first
> > insert operation would automatically begin a transaction.
>
> True, it does an implicit "BEGIN", but it also does an implicit
> "COMMIT" when each command finishes.  Try adding an explicit "BEGIN;"
> before you do the inserts: <http://www.sqlite.org/lang_transaction.html>
>
> --nate



But if you set Autocommit to 0, doesn't it wait till commit is called
explicitly?

Reply via email to