[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Effect of indices on SQLite (optimizer) performance

From: John Szakmeister <john_at_szakmeister.net>
Date: Tue, 8 Feb 2011 04:07:31 -0500

On Sat, Feb 5, 2011 at 2:41 PM, Erik Huelsmann <ehuels_at_gmail.com> wrote:
[snip]
> Their FAQ (http://www.sqlite.org/faq.html#q19) sure suggests that it's
> not wise to do separate inserts: the document says SQLite easily does
> 50k inserts per sec into a table on moderate hardware, but only
> roughly 60 transactions per second...
>
> That would surely point into the direction of using transactions when
> we need mass inserts! I'm not sure exactly where in our code these
> inserts should be collected though. Maybe one of the WC-NG regulars
> has an idea?

That has certainly been my experience with SQLite. I was feeding in
several hundred thousand rows into SQLite (it was "pretend" instrument
data that I wanted to use for performance testing), and inserting them
inside a transaction made the difference between hours and seconds.
In fact, I had started the process before heading to the office, and
when I came back home 10 hours later, it was still running!

-John
Received on 2011-02-08 10:08:11 CET

This is an archived mail posted to the Subversion Dev mailing list.