4 ms·
> if I had the option to use PostgreSQL for something I'd never ever get close to choosing SQLite over it I had the option for a recent project. It's a niche f
by tazu 2y ago
> if I had the option to use PostgreSQL for something I'd never ever get close to choosing SQLite over it
I had the option for a recent project. It's a niche forum-like application with around 2,000 users. Went with a monolithic design and vertical scaling (if needed), so SQLite was perfect. Every dynamic HTML page renders in under 1ms. Litestream for live-replication to a couple S3 buckets.
Running PostgreSQL for something like this would be a pain in the ass, and add a minimum 10ms of latency to every request. There would genuinely be more maintenance required for the PostgreSQL server/daemon than the application itself. It just makes no sense.
- mbreese 2y ago> There would genuinely be more maintenance required for the PostgreSQL server/daemon than the application itself. It just makes no sense. I think this is the key point the original post was missing. When you’re working on a project with a DB, you should factor in the cost/overhead of the DB as well. Postgres is a wonderful DB. But it is also big and requires work to keep it running. For many projects, the extra overhead is well worth it. (And if you’re using a “cloud” DB, the overhead is still there, but you’re explicitly paying for the privilege of making it someone else’s problem. ) But for smaller projects, or ones with less DB requirements, something small like SQLite is much more appropriate. And it nearly removes the DB overhead from the maintenance equation.
- tazu 2y agoAnd the value of maintenance-free differs by environment. A lot of my projects are one-offs where I'm not getting paid to maintain a database system, so I don't want to maintain a database system.
- liveoneggs 2y agothe real shock is how many websites, powered by wordpress, use mysql instead!
- strken 2y agoIs that 10ms of network latency? I remember Postgres being pretty low latency if you run it on the same host, although the point about maintenance makes complete sense.
- tazu 2y agoYea ~10ms is my experience using localhost TCP, using a Unix socket would probably be faster.