Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Or you could use sqlite until you need postgres. I have to admit I reach for postgres immediately when in many cases sqlite would have served me just as well.



SQLite seems to be gaining popularity with even larger projects which is surprising to me. As I see it, the big value prop of SQLite is that it runs in-process which, for a webapp, is almost nil?

Other than that, it's not like queries are any simpler and the "simple" type system is, in my opinion, not a feature. I get that some might disagree with that.

Is there some other reason why you would prefer it?


It has an extremely low barrier of entry while providing the features of a relational database when all you need is a local data store. The files are trivially easy to transport using standard tools when needed. I've been in back-end automation/integration for my entire career and use these kinds of things all the time. The overhead of maintaining a full networked RDBMS isn't always something I want (or need) to do.


Here’s a great article explaining some of the benefits of using SQLite in production: https://blog.wesleyac.com/posts/consider-sqlite

I use it in my production SaaS serving around 4 million requests per month on one of the lowest DigitalOcean tiers. The big ones for me were cost, operating simplicity and performance. I don’t need a separate process or server running which has saved me some money and time, and the app’s workload doesn’t need a ton of inserts so the speed is blazing fast.


"4 million requests per month"

There are 2,592,000 seconds in a month. So, 1.5 requests per second?


Oh whoops it’s actually 4 million per day! Good catch.


I agree with you about the worse type system not being a feature. Also missing the json features of postgres is inconvenient.

Only one file to backup or deploy is the biggest advantage of sqlite IMO.


It may not quite have all of the JSON features of Postgres, but recently the JSON handling has become way more usable in SQLite. More than usable for sure.


Hat tip to both the amazing native JSON support from Postgres, and the SQLite module with JSON functions: https://www.sqlite.org/json1.html


Check out Cloudflare D1


It looks neat but I am still not sure what the appeal is exactly. Is it cost reduction?


Cost reduction and simplicity - costs nothing if no one is using it


I’m super intrigued by SQLite these days.

11 years ago you used Postgres because that’s what Heroku told you to use.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: