Earlier quoted context omitted.
> SQLite is all you need if it really is all you need. most use cases are really capable of being satisfied by sqlite, but the "architect" imagines they need more (or is preparing for the potential).
If you could conceivably use multiple processes at once to access the database, and not just as an edge case, you need something more than sqlite. Sqlite does support multi-process access correctly, but the performance is abysmal as it locks the entire file for any write transaction. Client/server databases have much smarter concurrency.
SQLite Is All You Need
41–50 of 66 posts
Re: SQLite Is All You Need
#42Author here. This started because I read Evan Hahn's STRICT tables post [1] last week and got curious how far "just use SQLite" actually holds up under real load, not toy benchmarks. So I built a small social app (Chirp: 50k users, 1M posts, ~2.5M follows) in one SQLite file, put it behind a plain Node server, and load tested it properly: real HTTP, real JSON serialization, autocannon hammering it over sockets. The w…
This comment was shadowbanned because an LLM wrote it, and HN uses an LLM detector.
That gave it away for me. I still appreciate the information contained in the reply but it was obvious. FWIW I don’t mind LLM content as long as I’m learning something.
Re: SQLite Is All You Need
#43Earlier quoted context omitted.
In fairness, sqlite is perfectly happy with Julian dates or Unix timestamps (that’s the affinity of a column typed “datetime” in non-strict mode) and timestamp(tz) are nothing to write home about except in complaint.
so now we've traded a text column for an int column that still can't validate that the number is actually externally consistent with the real world.
Re: SQLite Is All You Need
#44Earlier quoted context omitted.
> SQLite is all you need if it really is all you need. most use cases are really capable of being satisfied by sqlite, but the "architect" imagines they need more (or is preparing for the potential).
> the "architect" imagines they need more (or is preparing for the potential) I guess I am one of those "architects" that imagines they need an actual date/time storage class instead of some stringly-typed text column that I hope will contain a parsable ISO8601 datetime string when I try to read it back. Hipp said that it will never be added because it will bloat the size of the embedded object. Because that is what…
To be honest if you're using JSON at any point in your stack you have the same issue.
Re: SQLite Is All You Need
#45The tests and the numbers are interesting. The LLM writing style? Insufferable. It really wouldn’t have taken much effort to cut out the worst of the AI fluff, and maybe add some human touches
Inspired me to finally build (well, vibe code) a cliché detector https://tools.simonwillison.net/llm-cliche-highlighter
Re: SQLite Is All You Need
#46I love SQLite, but my clients expect minimal data loss and downtime when one of my servers goes down. How are people solving that issue with SQLite? Everytime I’ve investigated it, it seems like the state of the art is not very battle tested WAL shipping solutions. If I’m setting something like that up, suddenly running Postgres with its battle tested replication starts to look not so much more complicated in compari…
litestream is good for this.
Re: SQLite Is All You Need
#47> the Postgres container you spun up out of habit was never needed These posts need to stop comparing their contrived use-cases for SQLite to Postgres. Sure, SQLite is all you need if it really is all you need . But Postgres does so much more than just act as a data dump with an SQL engine on top. Dr. Hipp himself even said that SQLite does not, and will never, compete with the likes of Postgres. It competes with fop…
> SQLite is all you need if it really is all you need. most use cases are really capable of being satisfied by sqlite, but the "architect" imagines they need more (or is preparing for the potential).
So I had to migrate the production db under live load from sqlite to mysql which was a quite ...intense week. I still like sqlite but I'd be wary of using it again for a usecase like mine.
Re: SQLite Is All You Need
#48Earlier quoted context omitted.
so now we've traded a text column for an int column that still can't validate that the number is actually externally consistent with the real world.
Is there an invalid unix timestamp? What is there to validate?
SQLite will gladly store a u64::MAX as a "unix timestamp" despite it being about 300x larger than the number of seconds that the universe and everything in it has existed.
Try reading that back in any application date/time code and your app probably crashes immediately.
Re: SQLite Is All You Need
#49There's some bad advice in the article: "Backups are a file copy. [...] you can back up a live SQLite database, under write load, without stopping anything." This is straight out of section 1.2 of https://www.sqlite.org/howtocorrupt.html . Yes, you can do that, and sometimes you will end up with a valid, non-corrupt backup. But it's timing-dependent: lose the race and you'll end up backing up a partially written tran…
Ran into 2.2. https://www.sqlite.org/howtocorrupt.html -- the backup was close()ing the database file descriptor and canceling the SQlite locks.
Re: SQLite Is All You Need
#50Earlier quoted context omitted.
https://sqlite.org/wal.html presumably.
But like any message board it will get peak time hits So lunchtime in America there will be multiple people posting comments at the same time And Sqllite only allows one writer, so what happens if multiple people send their comments at once So are they using ultra fast storage on the host or queues or other