On Tue, Mar 28, 2017 at 11:08 AM, Richard Hipp <d...@sqlite.org> wrote:
> On 3/27/17, Andrew Cunningham <and...@a-cunningham.com> wrote: > > Is it likely the maximum BLOB size will be increased in a not too distant > > future version of SQLite? > > The maximum blob size could, in theory, be increased to 4GiB. But the > current file format will not accommodate anything larger than that. Any chance you'd elaborate on which the format is blocking here? I have no doubt you're right, but I'd really appreciate a better understanding of that limitation. As a naive developer, I can see the Record Format [1] uses a varint, which can go up to 64-bit integers. And also that there are Serial Types 10,11, which are "Not used. Reserved for expansion". Which combined with The B-tree Page Format [2], which has only 4 page types, while a whole bytes is available for blob pages, a new blob-specific page type would seem possible. Given the above, I can (wrongly) imagine use Record Type 10 for "new-style blobs", which store a varint length for the "blob index" that follows, where that blob index is a ordered list of page-specific page numbers (as varints or not) where that blob is stored. In such a scheme, updating a single byte of a blob requires changing 1 blob page, and the page(s) storing the "blob index"; and blobs can also be expanded or contracted transitionally w/o having to rewrite the whole blob. I'm just trying to understand how/where that mental model is wrong. Thanks, --DD _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users