Postgres vs SQLite Benchmark: Why SQLite Won 1,244 to 589 req/s
By Matt Cullerton, founder of Mavric and Apso
A TikTok from @arjay_mccandless benchmarks the same Go API on Postgres and SQLite on a $12 DigitalOcean droplet. SQLite served 1,244 requests per second to Postgres's 589 on a read-heavy mix, and Postgres won 573 to 233 on a write-heavy mix. Both results match what the two projects' own documentation predicts, so the test shows a library beating a server on one core, not a slow Postgres.
The benchmark setup
The video's cards describe a DigitalOcean droplet running Ubuntu with 2 GB of RAM at $12 a month, a Go API built on net/http, and seed data of 50,000 users, 500,000 posts and 2,016,005 likes loaded into both databases. The read-heavy mix is spoken as "92% reads, 8% writes." The write-heavy mix is 43% writes.
DigitalOcean's pricing page lists the $12 Basic Droplet as 1 vCPU, 2 GiB RAM, 50 GiB SSD and 2,000 GiB transfer. That single CPU decides the result.
The video never shows a terminal, a load generator, source code, a schema, a Postgres version or raw output. Every number appears on an animated card.
Why is SQLite faster than Postgres here?
The two databases run differently. The PostgreSQL docs say the server "starts ("forks") a new process for each connection." SQLite's About page says "SQLite is an in-process library" and "SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files."
On one CPU, the Go app and the Postgres backends compete for the same core. The video says Postgres used about 60% of the CPU at peak (the card shows 58%). Every cycle Postgres spends is a cycle the Go process cannot use. SQLite runs inside the Go process, so that split does not happen. The ratio on the card checks out: 1,244 divided by 589 is 2.1.
The video blames per-connection process creation. Its own diagram shows a pool of ten connections feeding ten Postgres processes, which means the forks happen once at startup and get reused. The repeated cost per request is the socket round trip to a backend, the context switches that round trip forces on one core, and the work Postgres does on each statement: parse, plan, execute, MVCC visibility checks and WAL accounting.
The video does not test a second CPU, so the 2.1x figure describes this one droplet.
Is Postgres slow?
No. SQLite's maintainers reject the comparison. Their "Appropriate Uses For SQLite" page says: "SQLite does not compete with client/server databases. SQLite competes with fopen()."
The same page predicts this benchmark. On SQLite as the storage layer inside an application server, it says: "Developers report that SQLite is often faster than a client/server SQL database engine in this scenario. Database requests are serialized by the server, so concurrency is not an issue." One Go process on one core running mostly reads is that scenario.
Why does Postgres win on writes?
Postgres lets multiple write transactions run at once with row locks. SQLite's WAL documentation says "WAL provides more concurrency as readers do not block writers and a writer does not block readers," and then: "However, since there is only one WAL file, there can only be one writer at a time." The FAQ says "only one process can be making changes to the database at any moment in time."
The video says SQLite "can only handle one under a standard setup," and that wording holds even with WAL mode turned on. At 43% writes, Postgres reached 573 req/s and SQLite 233, a 2.46x reversal on the same hardware. The video shows those numbers on screen but never speaks them.
Were the two databases configured fairly?
That is unclear. The write-heavy card says "both fsync every commit to disk." Postgres does by default: its docs list synchronous_commit and fsync as on by default. SQLite only does if configured to. The WAL docs say: "Writers sync the WAL on every transaction commit if PRAGMA synchronous is set to FULL but omit this sync if PRAGMA synchronous is set to NORMAL."
The video never states SQLite's journal mode or synchronous setting. Those settings change SQLite's write throughput a great deal, and the WAL page notes "WAL is significantly faster in most scenarios." The 233 figure could depend heavily on them.
When should you use Postgres instead of SQLite?
SQLite's own guidance draws the line: "If there are many client programs sending SQL to the same database over a network, then use a client/server database engine instead of SQLite," and "If the website is write-intensive or is so busy that it requires multiple servers, then consider using an enterprise-class client/server database engine instead of SQLite."
The video's list of Postgres advantages matches that: many writers at once, several app servers sharing one database, granular user permissions, and extensions for vector search and geospatial data.
On replication, the video says Postgres has it built in and needs other tools for automatic failover. The PostgreSQL failover docs agree: "PostgreSQL does not provide the system software required to identify a failure on the primary and notify the standby database server. Many such tools exist." The two tools named in the video are real and maintained. Patroni is "a template for high availability (HA) PostgreSQL solutions using Python" covering PostgreSQL 9.3 through 18. pg_auto_failover, maintained by Microsoft, is "a Postgres extension and service for automated failover and high-availability" for PostgreSQL 13 through 18.
The video ends by promoting Devmaxx, a product the creator sells.
Bottom line
On a one-CPU server with a read-heavy load, an in-process library like SQLite will beat a client/server database, and SQLite's docs say so. Postgres wins once writes pile up or more than one server needs the data. Treat the exact numbers with care, since the video never shows the test running or SQLite's durability settings.
Sources
- Appropriate Uses For SQLite - the fopen() comparison and when to choose a client/server database
- About SQLite - SQLite's in-process design
- SQLite Write-Ahead Logging - single-writer limit and sync pragmas
- SQLite FAQ - one writer at a time
- PostgreSQL architectural fundamentals - process per connection
- PostgreSQL WAL configuration -
synchronous_commitandfsyncdefaults - PostgreSQL connections and authentication - Unix-domain socket and TCP connection settings
- PostgreSQL failover - no built-in automatic failover
- Patroni documentation - Python HA template for Postgres
- pg_auto_failover on GitHub - automated failover extension
- DigitalOcean Droplet pricing - the $12 droplet specs
- Devmaxx FAQ - the product promoted in the video
Published October 12, 2026. Based on a TikTok by @arjay_mccandless. Full video notes (markdown)