OMG!  I can't believe the speed difference!

I wrapped around 3000 transactions, executing them 3 times, so I did a

for y=0, y<3, y++
{
begin immediate transaction testtrans
{
for x=0, x<3000, x++
insert record
}
end transaction testtrans
}

and inserting those 9000 records took maybe a second!!!!! Wow, much more impressive!! Thanks for the suggestions!


Now my only question is looking at the reference, it talks about begin, end, commit, rollback - should I be using commit before end, or does end imply a commit?

also, since this is single user, I assume using immediate or exclusive is ok.

-Tony

----- Original Message ----- From: "A. Pagaltzis" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, June 24, 2006 12:07 PM
Subject: Re: [sqlite] Improving insert speed?


* Tony Harris <[EMAIL PROTECTED]> [2006-06-24 19:05]:
Is this about average, or is there a way I might be able to get
a little more speed out of it?

Put a transaction around your INSERTs, at least around batches of
a few thousand each, and you’ll get much better speed.

Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to