Subject | Re: [firebird-support] Re: Firebird DB Size |
---|---|
Author | Ann W. Harrison |
Post date | 2005-07-27T20:26:55Z |
Adam wrote:
Unless you modify the blob field, all versions of the record point to
the same instance of the blob. When a record is garbage collected, part
of the process checks whether the blob is referenced in record versions
that persist, in which case the blob is not removed. So if you have a
record that contains a blob and modify only non-blob fields, there's one
copy of the blob. If you modify the blob field, then you get a second
copy of the blob and the first copy will eventually be garbage collected.
Regards,
Ann
>>That's true in general, but blobs are not handled like other data.
>>Is there any thing to decrease DB size?
>>
>
> Firebird is a multi-generational architecture database (MGA). When you
> change a field, it makes a copy of the record rather than changing the
> existing record.
Unless you modify the blob field, all versions of the record point to
the same instance of the blob. When a record is garbage collected, part
of the process checks whether the blob is referenced in record versions
that persist, in which case the blob is not removed. So if you have a
record that contains a blob and modify only non-blob fields, there's one
copy of the blob. If you modify the blob field, then you get a second
copy of the blob and the first copy will eventually be garbage collected.
Regards,
Ann