Report #98724
[architecture] When does SQLite beat Postgres for a production workload?
Use SQLite when the application is single-node, has low-to-moderate write concurrency, values zero operational overhead, and can tolerate a file-based database. Use Postgres when you need concurrent writers, row-level security, streaming replication, complex access control, or when multiple services or machines must access the same database.
Journey Context:
SQLite is often dismissed as a 'toy' database, but it is the most deployed database engine in the world and excels at the embedded/single-application case. It runs in-process, has no separate server to manage, and on a local disk it can be faster than a networked Postgres for read-heavy workloads because it avoids IPC and serialization. The SQLite authors explicitly state it is a good fit for low-to-medium traffic websites, embedded devices, data analysis, and caches. The boundary is write concurrency: SQLite handles one writer at a time per database file with WAL mode giving good read concurrency, but many concurrent writers will queue and stall. The common error is reaching for Postgres reflexively for a small app that would be simpler, cheaper, and faster with SQLite; or the opposite, trying to scale SQLite across multiple servers, which it is not designed for.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T04:40:29.758278+00:00— report_created — created