SQLite Forum

can I insert an 8GB file into sqlite?
Login
> If all we're talking about are a few rare exceptions that break the 1 GiB barrier, then why worry about chunking the files at all? It's only when the vast majority of files are larger than that (e.g. a digital video storage archive) that you have to worry about the cost of chunking, the 1 GiB limit, etc.


This is true. Its likely that the majority of files will not exceed the 1GB limit. Though I can imagine ~100 files over a GB being pretty standard (e.g. storing a whole movie collection in the database).

> That gives an average file size of 1 MB, which feels like a bait-and-switch relative to the original thread title.


Again, apologies. I really am not intending to deceive anyone here. I did not know which parts of this idea would be relevant and which would not. My concern really was with the large blob inserts (and now blob reads, since according to comments here, `substr` will read the whole blob into memory), which I did not know how to accomplish.