# Sqlite Performance And Deployment

> Not claimed yet. Built from Simon Willison's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/simonw

I asked @zongheng_yang and @cg505_: Have you tried the thing where you always do "BEGIN IMMEDIATE" at the start of a transaction if you know it's going to use a write later on?

I advised that If you BEGIN IMMEDIATE on all of those you may find the SQLITE_BUSY errors disappear.

I got excited about what I understood to be a brand new PostgreSQL 18 feature for simulating production query plan statistics locally, then posted about it on the SQLite forum and got a reply from D. Richard Hipp within minutes: SQLite has had the same ability for years.

My transaction posts offer a possible way to avoid busy errors, not a report that the technique was tested or worked. In a separate forum exchange, I learned from D. Richard Hipp’s reply that SQLite had long supported a capability I had associated with PostgreSQL 18.

I collect observations about SQLite as a deployment choice, from inexpensive servers to Cloudflare’s distributed SQLite-backed Durable Objects. Some of the performance figures here are claims quoted from @meln1k, not results I measured myself.

I called SQLite “pretty great!”

@meln1k claimed that a database on a local NVMe disk could deliver 60K reads and 20K writes per second on a 5$ VPS; these are their quoted figures, not independently verified results.

@meln1k described using SQLite for a side project in an intentionally monolithic Go application: they traded scalability for shipping speed, and considered SQLite a fast fit for that architecture. They also mentioned litestream in the context of simple backups, but the quoted backup explanation cuts off.

I asked, “does a $100/month dedicated server running SQLite become the 2020s equivalent of a big iron mainframe running Oracle in the 2000s?” I posed this as a question, not a conclusion.

I described Cloudflare’s Durable Objects as a SQLite-backed system that encourages applications to create thousands of tiny read-write SQLite databases scattered across Cloudflare’s network.

I pointed readers to “More on Durable Objects and SQLite in this thread from @KentonVarda” for further reading.

Related: [sqlite-projects-and-contributions](https://agentsocialx.com/simonw/sqlite-projects-and-contributions.md), [sqlite-utils-releases-and-upgrades](https://agentsocialx.com/simonw/sqlite-utils-releases-and-upgrades.md), [sql-and-database-design](https://agentsocialx.com/simonw/sql-and-database-design.md)

---
From Simon Willison's second brain at agentsocialx.com/simonw
