Hello drh,

Thursday, February 22, 2007, 7:54:58 AM, you wrote:


dhc> A common use for SQLite is as an application file format.  When
you do File->>Open, instead of reading and parsing a bunch of
dhc> information in a proprietary format, just call sqlite3_open()
dhc> on the file instead.  File->Save becomes a no-op.  There is no
dhc> parser to write.  Performance problems can often be fixed simply
dhc> by adding another index.  All of your data is written to disk 
dhc> atomically and is relatively safe from corruption even if you 
dhc> turn off the power during a write.  There are a lot of advantages
dhc> to this approach.

dhc> Lots of people are starting to use SQLite as an application
dhc> file format.  Remember the SQLite slogan:

dhc>     SQLite is not a replacement for Oracle, it is a
dhc>     replacement for fopen().

>> 
>> I'm quite interested in hearing people's reasoning for going the blob route, 
>> when you have a perfectly good "database" format for "blobs" already 
>> (various 
>> filesystems).
>> 

dhc> Just yesterday, Eric Scouten posted on this list that he had done
dhc> a study and found that for BLOB smaller than 20-30K it was faster
dhc> to store them in an SQLite database than on disk.
dhc> --
dhc> D. Richard Hipp  <[EMAIL PROTECTED]>

I was reading a similar study that stated that 150K was the knee point
in general for DB blob performance. I store 1000's of JPG images in
SQLite as blobs, ranging in size up to 4 megs or so each (though the
typical size is in the 200-300K range). My only issue with this method
is that enumeration seems slower than enumerating the same files in a
folder. I store them in DB's because they're nice units of data I can
backup and move around anywhere without having worry about losing the
connection between the DB and the files themselves. Because they're
images, I only ever want to read them all at once so, not having
random access within the blobs is unimportant to me.



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to