Ask HN: Have you used SQLite as a primary database?
91–100 of 330 posts
Re: Ask HN: Have you used SQLite as a primary database?
#92Side question: what’s something as simple as SQLite, but more of an unstructured key-value store? I’ve been using (locally) a Redis container for a very early prototype because it seems to be simple enough to use. I know you can query json strings in salute but that’s not quite the same thing. For one redis offers some geo features.
Re: Ask HN: Have you used SQLite as a primary database?
#93Here's an all-time great post about why you might consider SQLite in production with data about performance: https://blog.wesleyac.com/posts/consider-sqlite I use SQLite in production for my SaaS[1]. It's really great — saves me money, required basically no setup/configuration/management, and has had no scaling issues whatsoever with a few million hits a month. SQLite is really blazing fast for typical SaaS workloads…
Litestream is indeed a missing piece of the puzzle. But it also defeats some of the purpose of using an embedded database library in the first place. Now you're back to juggling separate processes once again.
Re: Ask HN: Have you used SQLite as a primary database?
#94It depends on the application you are developing. If you are doing microservices, separate the database from the application is a must.
Re: Ask HN: Have you used SQLite as a primary database?
#95The sqlite docs page has a nice article [1] on when to use an embedded database such as sqlite and when to go with a client/server model (postgres, mysql or others) When not to use sqlite: - Is the data separated from the application by a network? - Many concurrent writers? - Data size > 280 TB For device-local storage with low writer concurrency and less than a terabyte of content, SQLite is almost always better. [1…
> For device-local storage with low writer concurrency and less than a terabyte of content, SQLite is almost always better. Isn't MySQL MyISAM faster and this way constitute a better choice for a scientific number crunching application? I mean near 4GB DB, very simple schema, heavy reading load, little/no inserts and no updates.
Faster, but at what price?
Re: Ask HN: Have you used SQLite as a primary database?
#96Question for people using SQLite in prod: how do you cope if your app is running on a platform like Heroku or Cloud Run, rather than a proper server or VM? Have you found a solution for the fact that those environments, and disk, is ephemeral?
You could use Render or a similar service that offers persistent storage. I imagine Heroku has a similar feature. [0] https://render-web.onrender.com/docs/disks
Re: Ask HN: Have you used SQLite as a primary database?
#97I love it - very robust, lots of documentation, StackOverflow answers, example queries, etc.
On a typical day, I get less than 50 users per day globally, so I don't really have to worry much about concurrency or other issues that SQLite struggles with. I'd wager that many web applications are perfectly well served by it.
Re: Ask HN: Have you used SQLite as a primary database?
#98Re: Ask HN: Have you used SQLite as a primary database?
#99Yes for all my sites: Nomad List, Remote OK, Hoodmaps, Rebase etc. No real issues at all.