On 4/22/15, Janke, Julian <julian.janke at capgemini.com> wrote: > The embedded system has various storage media, with different read / write > speeds. > A quick and dirty test shows that the outsourcing of the journal files on a > faster medium may be a significant speed boost. > Is there a possibility to write journal(temporarly) (and later wal files > when I found the error) files to another directory as the main database? > (temp_store_directory is marked as deprecated, and thus seems to be no > option). >
You can do this, and get away with it, in the highly controlled environment of a specific embedded application. Just modify your custom VFS to automatically move journal files to a different directory. Or even to give them completely different names. As long as the same journal file always gets the same modified name whenever that name is used, everything should work. Generic SQLite does *NOT* make this an option for a good reason. When recovering from a power loss, it is critical that SQLite be able to check for the existence of and read the journal file, otherwise database corruption may result. If journal files are on a different volume from the database files, then that volume might not be remounted upon reboot, or it might be mounted in a different place, thus preventing SQLite from locating the journal file. We have no way to control this in the general case, except to ensure that journal files are always in exactly the same directory as the database. But you can control this in your highly controlled and constrained environment, and hence you can get away with putting journal files on different volumes from the database. -- D. Richard Hipp drh at sqlite.org