In a cache situation I would expect that keeping the binary data in files would be preferable because you can use far more efficient mechanisms for loading them into your cache and in particular in transmitting them downstream. Your DB only needs to store a pathname.

Just be wary of directory size, and do not put them all in the one directory.

Andreas Volz wrote:
Hello,

I'll tell you my current situation. I implemented a web cache function
for images and other data in my application. In the past I saved the
data on the hard disk with a special name and had a text file with the
relation "cache file name <-> url". But I didn't like it. Now I like to
evaluate sqlite as solution.

So my question is about the binary data. Is it better to insert the
images and other media data (e.g. videos with < 10 MB of size) into the
DB or only a "pointer" to a file laying around on my hard disk? I would
estimate a maximum DB size of several hundred MB.

How good/bad is reading/writing this data into a BLOB compared to write
it as file beside the DB and write only a small name into the DB? Where
is the difference between both ways regarding memory and CPU usage?

BTW: My current use case writes data slow, but reads data fast. Reading
BLOB's must be as fast as reading on the hard disk.

regards
Andreas

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



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

Reply via email to