Subject | Re: BLOB move? |
---|---|
Author | benedicte_asselin |
Post date | 2005-03-02T19:31:33Z |
> > I use Firebird BLOBs to store documents. My transactions couldbe
> > safely split in two parts, one that stores the document, onethat
> > shows it to the 'world'. The purpose to have the long part inthe
> > first transaction which does not prevent any concurrent work andthe
> > second transaction which must lock some stuff would be very fast.It also
>
> Your analysis omits the fact that storing new data doesn't block
> anything, so no part of the operation prevents concurrent work.
> omits the fact that copying a blob from one row to another iscopy
> approximately as expensive as storing it in the first place. The
> operation makes a new blob and copies the content to it. There'sno way
> for two records to reference the same physical blob. There couldbe if
> blobs had use counts, but they don't.you
>
> So, yes, you can do what you're proposing, but no, it won't buy
> anything.Thank you for the info, I just omitted one thing: the document comes
from the network and may come slowly, I may also play somewhat
lengthy algorithms in this first transaction.
Will the copy occur even for big blobs that are stored out of the
table pages? (knowing that I would first remove the blob id from
first row, then only set it in second)
Regards,
Armel