SQLite: WAL Mode
From SQLite v3.7.0, write-ahead logging (WAL) mode is available which has the following advantages:
- It is significantly faster.
- It enables more concurrency as readers don’t block writers and vice-versa.
- It makes disk i/o more sequential.
To enable it on existing sqlite databases, run the following command.
❯ sqlite3 foobar.db 'PRAGMA journal_mode=WAL;'