> > On 6 Jul 2010, at 6:05pm, Martin Knafve wrote: > >> On my PC, INSERT's with fsync disabled >> is ~50 times faster than when fsync is used, so I would expect enabling >> WAL to give me at least a 500% speedup. Of course, my assumptions are >> very >> rough and I understand that I'm likely far off. >> >> Am I missing something here? What kind of performance improvments should >> I >> expect on INSERT statements not taking part in a transaction when using >> the WAL? > > All INSERT statements take part in a transaction -- SQLite cannot make > changes which aren't part of a transaction. If you haven't explicitly > declared a transaction before the INSERT statement, SQLite creates a > transaction especially for that one INSERT statement. So to dramatically > speed up a bunch of INSERT statements, put BEGIN TRANSACTION ... COMMIT > around the whole bunch. >
You're right - what I meant was "explicit transaction". I know that you can speed up things by placing everything in a large transaction, but in my software these kinds of bulk INSERT operations are very rare. (In my case, they would only be made during a BACKUP/RESTORE process). Kind regards Martin _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users