On Sat, Feb 12, 2011 at 9:10 AM, Black, Michael (IS) <michael.bla...@ngc.com
> wrote:

> Here's a little benchmark program I wrote to test a super-simple
> one-integer insert to test sql speed and commit interval behavior.
>
> Running it on my machine (Windows XP64 8-core 3Ghz gcc (tdm64-1) 4.5.1) I
> go from 320M inserts per second to 361K inserts per second when no
> begin/commit occurs.  With WAL mode turned on it only drops to 5.9M inserts
> per second.
>
> D:\SQLite>batch 5000 5000
> 320000000.0 inserts per sec
> D:\SQLite>batch 5000 2500
> 320000000.0 inserts per sec
> D:\SQLite>batch 5000 1200
> 160000000.0 inserts per sec
> D:\SQLite>batch 5000 600
> 160000000.0 inserts per sec
> D:\SQLite>batch 5000 300
> 106666666.7 inserts per sec
> D:\SQLite>batch 5000 150
> 53333333.3 inserts per sec
> D:\SQLite>batch 5000 75
> 32000000.0 inserts per sec
> D:\SQLite>batch 5000 40
> 17777777.8 inserts per sec
> D:\SQLite>batch 5000 20
> 10000000.0 inserts per sec
> D:\SQLite>batch 5000 10
> 3333333.3 inserts per sec
> D:\SQLite>batch 5000 5
> 2406015.0 inserts per sec
> D:\SQLite>batch 5000 2
> 526315.8 inserts per sec
> D:\SQLite>batch 5000 1
> 360766.6 inserts per sec
>

Unless I'm missing something, SQLite has to update the first page of the
database on every commit, to update the change counter.  Assuming you are
using rotating media, that record can only be updated 120 times per second,
maximum, on a 7200RPM drive.

I don't understand how you can do 360K commits per second if your system is
actually doing "to the platter" writes on every commit.  Can someone clue me
in?

Jim
--
HashBackup: easy onsite and offsite Unix backup
http://www.hashbackup.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to