Joe Wilson <[EMAIL PROTECTED]> wrote: > > If you read the blob all in at once, true. > But doesn't sqlite3BtreeData() allows you to read a partial chunk of > data from the blob at an arbitrary offset? This could be advantageous > if you are dealing with multi-megabyte blobs and do not require/want > the entire blob in memory at once. >
sqlite3BtreeData() actually reads a prefix of the data. Because of the way large blobs are stored (as a linked list of disk pages) you have to start reading at the beginning and read everything up to the point of interest. If you have multi-megabyte blobs, then you will want multi-megabytes of memory to store them in. If you do not want to use that much memory, store each blob in a separate file and put the filenames, not the data itself, in the database. -- D. Richard Hipp <[EMAIL PROTECTED]>