On Thu, Aug 1, 2019 at 5:44 PM Jens Alfke <j...@mooseyard.com> wrote:

> > On Jul 31, 2019, at 5:02 AM, Hick Gunter <h...@scigames.at> wrote:
> > SQLite stores rows in a compressed format that requires decoding. To
> access the nth field, all the fields that come before it need to be decoded.
>
> My understanding is that it’s just a matter of a byte-count before each
> field. So getting to the n’th field just requires n-1 memory reads and
> pointer additions, a handful of machine instructions. If so, that won’t
> measurably affect performance.
>

[DD] I think this assumes the row fits inside a page. Which with (inline)
blobs, may not be the case at all.
[DD] And Pages form a "linked-list", so reading past the blob may mean
reading ("paging") all those blob pages to follow that chain of page-ids,
to "get-past" a large blob.
[DD] There's a special mode where SQLite keeps extra pages to keep track of
pages, and thus can potentially avoid that "page-chain", but it's not often
used I believe.
[DD] But I'm no expert here :). --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to