Pedro Batista

Product ▪ Development ▪ Engineering

notes / Optimizing SQLite for servers /

Optimizing SQLite for servers

PRAGMA journal_mode = WAL;
PRAGMA busy_timeout = 5000;
PRAGMA synchronous = NORMAL;
PRAGMA cache_size = 1000000000;
PRAGMA foreign_keys = true;
PRAGMA temp_store = memory;

Source: https://kerkour.com/sqlite-for-servers

Other the well known "1 connection for writing, multiple for reading", see the IMMEDIATE transactions section.

Also see the following post: Distributed SQLite: Paradigm shift or hype?