←back to thread

275 points whatisabcdefgh | 1 comments | | HN request time: 0s | source
Show context
liuliu ◴[] No.45133756[source]
One thing I would call out, if you use SQLite as an application format:

BLOB type is limited to 2GiB in size (int32). Depending on your use cases, that might seem high, or not.

People would argue that if you store that much of binary data in a SQLite database, it is not really appropriate. But, application format usually has this requirement to bundle large binary data in one nice file, rather than many files that you need to copy together to make it work.

replies(1): >>45134101 #
Retr0id ◴[] No.45134101[source]
You can split your data up across multiple blobs
replies(3): >>45135219 #>>45136032 #>>45140501 #
1. liuliu ◴[] No.45140501[source]
That's right, but it is much easier to just use blob without application logic to worry about chunking. It is the same reason why we use SQLite in the first place, a lot of transaction / rollback logic now is on SQLite layer, not the application layer.

Also, SQLite did provide good support for read / write the blob in streamable fashion, see: https://www.sqlite.org/c3ref/blob_read.html

So the limitation is really a structural issue that Dr. Hipp at some point might resolve (or not), but pretty much has to be resolved by SQLite core team, not outside contributors (of course you can resolve it by forking, but...).