Subject Re: Store large amount of Binary Data in FB
Author Adam
--- In firebird-support@yahoogroups.com, Milan Babuskov <milanb@...>
wrote:
>
> Martijn Tonies wrote:
> >>afair, storing as huge blob as Yogi Yang needs reduces FB1.5
(don't know
> >>for newer versions) performances (at least effectiveness of indexes)
> >
> > I wouldn't know why... Indices are affected by the number of items
> > that can fit in a page and the selectivity, this has nothing to do
with
> > blobs.

My understanding is that BLOBs can be stored on the data page, but
only if they are small and there is enough room. Usually, they are
stored on separate page(s).

I can't see what selectivity has to do with it. Selectivity is largely
a measure of uniqueness of an index, not a measure of data density. As
blobs can not be indexed, it doesn't make much sense to me to speak
about selectivity.

I suppose it is possible that having blobs on the data page would
increase the number of pages the table is spread across, which would
make it more costly to select all fields other than the blobs, but in
this case we are talking about 25MB of data and page sizes measured in
KB. There is no way they will be on the data page.

To the OP, 7GB total in blobs is not 'huge'. There are benefits and
drawbacks to both approaches. When storing inside the database, it
makes it very easy to create versions of documents, and you don't need
to worry about 'broken links' because someone renames a folder. It is
also much easier to control the security to particular documents.

When storing outside the database, you can allow other types of access
to the files (eg windows share), and other applications can index the
documents independently of your application. Backups of your index
database will be comparitively quick, and incremental backups are
easier to manage.

There is no answer that is the right choice 100% of the time. Consider
your needs and choose the one that fits best.

Adam