Christopher Petrilli wrote:
Has anyone had any experience in storing a million or more rows in a
SQLite3 database? I've got a database that I've been building, which
gets 250 inserts/second, roughly, and which has about 3M rows in it. At that point, the CPU load is huge.



I just ran a test case inserting 3 million rows in a database. Wall-clock time was 122 seconds for a rate just shy of 25000 inserts per second. The final database size was 222428160. To check to see if performance was falling off with increases size, I then inserted an additional million rows. 41 seconds: 24390 inserts per second. New file size 297440256. This is on three year old hardware.

Inserts can be significantly slower if you have indices.  The more
indices you have the slower things might go.  (Depending on what
your indices and your data look like.) If possible, it is recommended
that you do all your inserts first, then do the CREATE INDEX statements
as a separate step afterwards.

What does your schema look like?


-- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

Reply via email to