On Wed, Nov 30, 2011 at 4:02 PM, Richard Hipp <d...@sqlite.org> wrote:
> On Wed, Nov 30, 2011 at 4:41 AM, Sreekumar TP <sreekumar...@gmail.com > >wrote: > > > Hello, > > > > I have sqlite configure to do manual checkpoint. I do checkpoint every > few > > hundred records. I expect the WAL to reduce in size and become zero when > > there are no more inserts done. > > However, I see that the WAL file size is static and does not reduce in > > size. Why isnt manual checkpoint reducing the size of WAL file. > > > > Because we have experimentally determined that it is faster to overwrite an > existing file than to append to a file. So we don't truncate the WAL file > on a checkpoint, which makes subsequent writes to the WAL file go faster. > > SQLite will truncate the WAL file down to the size specified by the "PRAGMA > journal_size_limit" setting, if you have set the journal_size_limit. > > Would it be possible to enhance SQLite to allow resetting the WAL file down to zero bytes? Something like pragma journal_size_limit=0; pragma wal_checkpoint=restart; Best regards, Filip Navara _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users