Thankyou both for the suggestions.
I set locking_mode=EXCLUSIVE and journal_mode=PERSIST but sqlite still
fsyncs the directories. I'll try building with SQLITE_DISABLE_DIRSYNC,
but hoping for a config only fix :)
I'll post another question to the list when I've explored these options
a bit more.
Cheers,
Jono
On 12/03/2014 1:31 a.m., Simon Slavin wrote:
On 11 Mar 2014, at 12:20pm, Dan Kennedy <danielk1...@gmail.com> wrote:
Or "PRAGMA locking_mode=EXCLUSIVE; PRAGMA journal_mode=PERSIST;",
if there will only ever be a single connection to the database.
Or you could build with SQLITE_DISABLE_DIRSYNC, which omits all
syncs on directories. Of course, that will slightly increase the
chances of a power failure causing database corruption.
'slightly' is more like 'greatly'. At least, that's my understanding of the
characteristics of the most common file systems these days.
Also watch for file systems which store the length of the file as a file
attribute you can read without opening the file. This means that every time
the file changes length, you /do/ have to rewrite the metadata. One of the
nice things about some SQLite modes is that the number of pages changes rarely
(pages are marked as unused rather than the file shortened). This means that
it's not necessary to change metadata very often.
The "PRAGMA journal_mode=PERSIST" thing is a great tip and should make a of
difference for some operations. I'll add to that my advice to leave auto_vacuum off.
Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
--
------------------------------
This email, including any attachments, is only for the intended recipient.
It is subject to copyright, is confidential and may be the subject of legal
or other privilege, none of which is waived or lost by reason of this
transmission.
If you are not an intended recipient, you may not use, disseminate,
distribute or reproduce such email, any attachments, or any part thereof.
If you have received a message in error, please notify the sender
immediately and erase all copies of the message and any attachments.
Unfortunately, we cannot warrant that the email has not been altered or
corrupted during transmission nor can we guarantee that any email or any
attachments are free from computer viruses or other conditions which may
damage or interfere with recipient data, hardware or software. The
recipient relies upon its own procedures and assumes all risk of use and of
opening any attachments.
------------------------------
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users