On 08/25/2016 04:41 PM, Adam Jensen wrote: > On 08/20/2016 01:01 PM, Simon Slavin wrote: >> On 20 Aug 2016, at 5:56pm, Lev <leventel...@gmail.com> wrote: > [snip] >>> So this 'setting' is stored in the database file? Is it enough to do the >>> PRAGMA when the database is created? >> >> Yes and yes, but do it this way. >> >> 1) Create the database file by opening it. >> 2) Do something that makes the file non-blank, like creating a table. >> 3) Issue "PRAGMA journal_mode=WAL" >> 4) Close the file >> >> From that point onwards that database is in WAL mode and everything opening >> it automatically knows that. You do the above sequence using your own >> software or the SQLite command-line shell tool. > > > When in WAL mode, when would `PRAGMA synchronous = NORMAL` be issued and > does it persist?
During database creation, this order seems to work: PRAGMA page_size = 2048; PRAGMA synchronous = NORMAL; PRAGMA foreign_keys = ON; CREATE TABLE ...; CREATE TABLE ...; PRAGMA journal_mode = WAL; .quit # https://www.sqlite.org/wal.html # https://www.sqlite.org/pragma.html#pragma_wal_checkpoint And, as far as I can tell, all of these PRAGMA's seem to persist - they do not need to be reasserted in any way during subsequent database accesses. Do all PRAGMA's, once set to a specific value, stay set? Does anyone have links to the related documentation? _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users