skip to content
Pradeep Chhetri

Software Engineer. Writing about databases, infrastructure, and distributed systems.

Main navigation

  • Home
  • Blog
  • TIL
GitHub LinkedIn RSS

SQLite: WAL Mode

October 5, 2020 · TIL

Tags:
  • sqlite
  • performance

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;'

© 2026 Pradeep Chhetri