Towards Inserting One Billion Rows in SQLite Under a Minute - Blag
Turning off journal_mode will result in no rollback journal, thus we cannot go back if any of the transactions fail. This disables the atomic commit and rollback capabilities of SQLite. Do not use this in production.
By turning off synchronous, SQLite does not care about writing to disk reliably and hands off that responsibility to the OS. A write to SQLite, may not mean it is flushed to the disk. Do not use this in production.
The cache_size specifies how many memory pages SQLite is allowed to hold in the memory. Do not set this to a high value in production.
In EXCLUSIVE locking mode, the lock held by the SQLite connection is never released.
Setting temp_store to MEMORY will make it behave like an in-memory database.