These disk access issues are why no database I know of actually
stores large objects inline. It would be crazy to do so.
mysql, postgres, and oracle all have support for blobs, and
none of them store them inline.

(btw, if you care about disk io performance for blobs,
you can tune the fs parameters for such large files.)

blobs are a pain no matter how you cut it.

i've built different applications with them in the database,
and without (storing just filenames, with files maintained
by the app, as drh suggested).
I've regretted both approaches :(.

The problems I've seen with not using database blobs:

1. kiss replication goodbye. If you are careful with file naming,
and never modify blobs, and use rsync, you can just barely get by.

2. You can't do text matching as part of a sql request. You have
to do your own external text indexing and join at the app layer.

3. You have to implement your own application-level transaction logic,
so that during updates and deletes of both database and file system
are inconsistent. Except that is hard to do right, so over time
the two *will* get inconsistent.

4. You have to have a shared file system for your database clients.
Which means NFS or samba, or something else which is painful
to set up and administer and is difficult to secure over a WAN.

The problems I've seen with using database blobs:

1. The blob-specific APIs are also usually database-specific.
They are typically poorly designed.
Now with JDBC3/ODBC3, they are at least not database-specific....

2. The semantics of blob modification within a larger transaction
is usually poorly documented, or buggy, or both.

3. You don't get to play with the blobs in the external file
system when you want to (even if for read only purposes).

4. Performance can still stink, unless you are careful. At the
wire level, the fetch blocks usually only contain "locator"
objects, and these are converted to data streams only when
asked, and that usually requires a new independent roundtrip
and set up for every blob. So you end up doing things like
using sql functions which fetch the first 1000 bytes of the blobs
(if that is what your app wants), so that they are streamed with
the rest of the fetch.


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to