Skip to content

Instantly share code, notes, and snippets.

@cosmez
cosmez / sane-defaults.sql
Created May 16, 2025 17:15 — forked from james2doyle/sane-defaults.sql
Here is a list of sensible defaults when using sqlite https://briandouglas.ie/sqlite-defaults/
-- @see https://briandouglas.ie/sqlite-defaults/
-- Set the journal mode to Write-Ahead Logging for concurrency
PRAGMA journal_mode = WAL;
-- Set synchronous mode to NORMAL for performance and data safety balance
PRAGMA synchronous = NORMAL;
-- Set busy timeout to 5 seconds to avoid "database is locked" errors
PRAGMA busy_timeout = 5000;