SQLite Is Scalable: But Why Bother When PostgreSQL Exists?
In the world of databases, SQLite often gets dismissed as a “toy” for small-scale projects — embedded in mobile apps, used for quick…

In the world of databases, SQLite often gets dismissed as a “toy” for small-scale projects — embedded in mobile apps, used for quick prototypes, or tucked away in desktop software. Meanwhile, heavyweights like PostgreSQL are hailed as the go-to for serious, scalable applications. But is SQLite really unscalable? And if it can scale, why put in the effort when PostgreSQL is right there, battle-tested for enterprise loads?
I’ve dug into this claim, analyzing SQLite’s capabilities through official docs, real-world benchmarks, and expert discussions. Spoiler: SQLite is scalable, but in its own unique way — vertically, with optimizations, and for specific use cases. It’s not a one-size-fits-all replacement for PostgreSQL, but it shines where simplicity meets performance. In this article, we’ll break down the evidence, compare the two, and explore why you might still choose SQLite despite the “effort.”
Debunking the Myth: Is SQLite Really Scalable?
First, let’s address the core claim head-on. SQLite is scalable, but its scalability is often misunderstood. Unlike distributed systems that scale horizontally across multiple servers, SQLite excels at vertical scaling — squeezing maximum performance from a single machine through hardware upgrades and smart configurations.
According to SQLite’s official documentation, it’s designed for low- to medium-traffic websites, handling fewer than 100,000 hits per day in most cases. Yet, the SQLite website itself processes 400,000 to 500,000 HTTP requests daily, with about 10% involving database access. That’s no small feat for a serverless, file-based database.
Real-world examples push this further. Expensify, a popular expense management app, scaled SQLite to 4 million queries per second (QPS) on a single bare-metal server using their custom Bedrock layer. They achieved this with optimizations like disabling unnecessary locks, making functions deterministic, and tweaking BIOS/kernel settings to avoid CPU throttling. The hardware? A beast with 192 physical cores, 1TB RAM, and 3TB NVMe SSD — proving that with vertical scaling, SQLite can handle hyper-scale workloads far beyond “toy” levels.
Other benchmarks echo this. In tests, SQLite outperformed PostgreSQL in single-writer scenarios, inserting 100 million records twice as fast. Developers report handling billions of inserts per day for log storage without failure. Tools like Litestream for replication and sharding across files enable horizontal-ish scaling, too.
But scalability isn’t just about raw speed — it’s about handling growth without crumbling. SQLite’s limits? It supports databases up to 281 terabytes, but concurrency is its Achilles’ heel: unlimited readers, but only one writer at a time per file. High-write apps or multi-user network access over NFS can lead to locks and slowdowns. For 500+ transactions per second or 1,000+ requests, you might hit walls without custom workarounds.
In short: Yes, SQLite scales — vertically to impressive heights, and with effort, even further. But it’s not “set-it-and-forget-it” like some distributed DBs.
SQLite vs. PostgreSQL: A Head-to-Head Comparison
So, if SQLite can scale, why not just use PostgreSQL? It’s robust, open-source, and built for scalability from the ground up. Let’s compare key aspects to see where each wins.
Architecture and Setup
- SQLite: Serverless and embedded. Your database is a single file — no separate process, no config files, no admin overhead. Deploy it anywhere: mobiles, desktops, or servers. Installation? Just include the library.
- PostgreSQL: Client-server model. Requires a running server, user management, and maintenance. Great for teams, but adds complexity and potential points of failure.
Winner for simplicity: SQLite. Ideal for solo devs or apps where ease trumps everything.
Performance and Scalability
- SQLite: Blazing fast for reads/writes in low-concurrency setups — up to 35% faster filesystem ops. Excels in single-user or read-heavy scenarios, like caching enterprise data or analyzing large datasets locally. Vertical scaling shines, but horizontal requires tools like replication.
- PostgreSQL: Handles high concurrency better with multiple writers and advanced indexing. Scales horizontally via clustering/replication. Better for web apps with 1,000+ users or complex queries.
Winner for high-scale, multi-user: PostgreSQL. But SQLite often beats it in raw speed for simpler workloads.
Features and Use Cases
- SQLite: Full SQL support (minus some extensions), but lacks stored procedures, advanced types, or built-in full-text search depth. Perfect for IoT, app file formats, temp databases, or education.
- PostgreSQL: Feature-rich — JSONB, GIS, extensions galore. Suited for enterprise apps needing ACID compliance across distributed systems.
Winner for advanced features: PostgreSQL. SQLite keeps it lean.
Cost and Maintenance
- SQLite: Free, zero maintenance. No servers to monitor, scale, or pay for. On cloud? Cheaper bare-metal outperforms EC2 by 3–10x in cost over time.
- PostgreSQL: Free software, but hosting/management costs add up. Requires DBAs for tuning.
Overall: SQLite for low-cost, low-effort setups.
Why Go Through the Effort? The Case for SQLite
Here’s the crux: If PostgreSQL exists, why bother scaling SQLite? Because sometimes, the “effort” is overstated, and the rewards are massive.
- Simplicity Wins Deployments: No ops team? SQLite deploys as easily as copying a file. For startups or indie devs, this means faster iteration without database drama.
- Performance in Niches: For read-heavy apps, edge computing, or single-server beasts, SQLite’s low latency and efficiency crush client-server overhead. It’s why companies like Expensify bet on it for millions of QPS.
- Cost Savings at Scale: Vertical scaling with SQLite on powerful hardware is cheaper than distributed PostgreSQL clusters. Plus, it’s reliable — battle-tested in billions of devices.
- Modern Tools Bridge Gaps: Projects like Turso or Fly.io make SQLite “cloud-native” with replication and global distribution, blurring lines with traditional DBs.
That said, if you need horizontal scaling, high writes, or advanced features out-of-the-box, stick with PostgreSQL. The “effort” for SQLite pays off when your app fits its sweet spot: efficient, embedded, and unapologetically simple.
Conclusion: Choose Wisely, Scale Smartly
SQLite isn’t just scalable — it’s a powerhouse in disguise, debunking myths with real benchmarks and use cases. But scalability isn’t everything; it’s about fitting your needs. Why bother over PostgreSQL? For the joy of simplicity, speed, and savings that let you focus on building, not babysitting databases.
If you’re prototyping a web app or handling edge data, give SQLite a shot. You might be surprised how far it scales. What do you think — SQLite convert or PostgreSQL loyalist? Drop your thoughts below!
This article is based on extensive research into SQLite’s capabilities. For more, check the sources linked inline.
Comments ()