Report #68645
[architecture] When should I choose SQLite over Postgres for a web application?
Use SQLite with WAL mode enabled for read-heavy, single-node deployments with low-to-moderate write concurrency \(<1000 TPS\) and where all clients can access the same local filesystem. Use Postgres when you need networked clients, high write concurrency across multiple processes, row-level security, or complex partial indexes.
Journey Context:
SQLite in WAL \(Write-Ahead Logging\) mode allows readers to not block writers and vice versa, achieving 60k\+ SELECTs/sec on modern SSDs. The 'SQLite doesn't scale' myth stems from old rollback journal modes or misuse on network filesystems \(NFS\), which SQLite explicitly prohibits for write access. For single-node Docker containers, Lambda functions, or edge deployments, SQLite eliminates network roundtrips and connection pool management. However, avoid SQLite when multiple machines need concurrent write access, or when you need online schema changes without locking \(Postgres excels here\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:42:16.071782+00:00— report_created — created