On 1/20/17, Tim Uy <t...@loqu8.com> wrote: > Hi, I currently start a :memory: database and then attach a physical > database and then set wal mode by using > > PRAGMA mydb.journal_mode=WAL > > 1. Is this safe? (I noticed default is 'delete')
DELETE is the default because it works in a wider variety of situations, such as on systems that lack shared memory and on network filesystems. > 2. Can I do it automatically with the ATTACH? So I don't have to wait 150 > ms for the WAL PRAGMA statement? WAL mode is a property of the database file. Changing in and out of WAL mode is a transaction, which is why it take 150ms (for the fsync()s to run). But once you set a database file into WAL mode it should stay there until it is changed again. You should not need to set WAL mode each time you open it. I do not recall a way to create a new database file that comes up in WAL mode. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users