SQLite Forum

General question concerning database stucture and number of databases to use.
Login
> SQLite would have to read column2, because it needs to know where it ends to find column3. Once it has read column3, SQLite knows it has everything it needs and doesn't bother reading c4, c5 or c6. By putting the column holding BLOBs at the end of the sequence you arrange that SQLite will never read it (or reserve memory for it) unless the SQL command needs it.

Sorry, but I do not understand that. There has to be some length information for the Blob, because otherwise one couldn't know where it ends. So all SQLite has to do is to skip (not read!) n bytes. Shouldn't be any slower than to skip a floating point number or an integer in column2.

For writing, it should also be indifferent whether 1 MB blob is written at the beginning or at the end. The whole row should always be the same size no matter of the order of columns.