On Wed, 27 Mar 2013 17:55:00 -0400, Jeff Archer
<jsarc...@nanotronicsimaging.com> wrote:

>On Wed, Mar 27, 2013 at 5:46 PM, David King <dk...@ketralnis.com> wrote:
>>
>> > I am populating a database with 5764 records using the exact same data set
>> > each time into a newly created file.
>> > When I use no explicit transactions (default atomic commit) it takes 17.7
>> > seconds.
>> > When I set journal_mode = off, same operation takes 5.5 seconds.
>> > If I do all 5764 inserts within a single transaction only 2.5 seconds.
>>
>>
>> That sounds about right, yeah. With journalling,
>> most disk writes have to be done twice (once to the
>> journal and once to the data file).
>
> Which is why I expected journal_mode = off to make it faster.  But it
> is 3 seconds faster when I leave journaling enabled and do all writes
> within a single transaction.

I miss one test case: both journal_mode = off, and all 5764 inserts
within a single transaction.

Give that one a thought (and a try) and you'll understand the
difference.

-- 
Groet, Cordialement, Pozdrawiam, Regards,

Kees Nuyt

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to