Switch the database to write-ahead logging mode.

Section: WAL mode and lock handling

Enable WAL journaling

sql
sql
PRAGMA journal_mode = WAL;
Explanation

WAL often improves read/write concurrency for app-style workloads.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing WAL mode and lock handling
Run a WAL checkpoint
Merge WAL contents back into the main database file.
OpenIn sheetsqlsame section
Set a busy timeout
Wait briefly when the database is locked.
OpenIn sheetsqlsame section
Inspect locking mode
See or set the database locking mode.
OpenIn sheetsqlsame section
Start a transaction
Bundle multiple statements atomically.
OpenIn sheetsql1 tag match
Begin an IMMEDIATE transaction
Reserve the write lock up front.
OpenIn sheetsql1 tag match
Roll back a transaction
Undo uncommitted changes.
OpenIn sheetsql1 tag match