SQLite Is Probably All You Need

SQLite handles more than you think. Stop defaulting to client-server databases.

Key Insights

  • SQLite with WAL mode handles 100K+ reads/sec and 10K+ writes/sec — sufficient for most single-server web applications
  • Enable WAL mode, set synchronous=NORMAL, and configure busy_timeout to make SQLite web-ready
  • Only reach for PostgreSQL when you need multiple application servers writing concurrently or geographic replication

SQLite processes more transactions per day than all other database engines combined. It’s not just for mobile apps and prototypes — it’s a legitimate production database for many workloads.

The Numbers

A single SQLite database on modern hardware can handle:

  • 100,000+ reads per second
  • 10,000+ writes per second (with WAL mode)
  • Databases up to 281 TB (theoretical limit)

When SQLite Fits

  • Single-server web applications
  • Read-heavy workloads
  • Applications with fewer than 100 concurrent writers
  • Embedded systems and edge computing
  • Configuration and state storage

WAL Mode Is Essential

PRAGMA journal_mode=WAL;
PRAGMA synchronous=NORMAL;
PRAGMA busy_timeout=5000;

WAL mode allows concurrent readers with a single writer. This is the configuration that makes SQLite viable for web applications.

When to Use Something Else

  • Multiple application servers writing to the same database
  • Heavy concurrent write loads (thousands of writes/second)
  • Need for replication or geographic distribution

The honest truth: most web applications serve fewer users than SQLite can comfortably handle. Try it before reaching for PostgreSQL.

Liked this? There's more.

Every week: one practical technique, explained simply, with code you can use immediately.