Subject Re: Firebird DB Size
Author Adam
--- In firebird-support@yahoogroups.com, "Bisey" <biseydegil@y...>
wrote:
> Thank you for reply. My application is really simple and based on
one
> major table. It has simple functions: add, edit, and delete
functions,
> also some queries about this table. So there are really not complex
> transactions.
>

It does not really matter how complex your program is. If a
particular transaction (transaction A) ***MIGHT*** be interested in a
record, then Firebird ***MUST*** keep note of that version of the
record until transaction A commits, even if transaction B comes along
in the mean time and modifies that record.

In effect, when transaction B modifies that record, it makes a copy
of the record in question, so as you can see, if you do not manage
transactions on tables with large records, the size can expand
rapidly.

> I can think about your suggestion for storing images. But I just
want
> to use these images with master table and didn't want to create a
> detail one.

Why not? I mean I don't mind if my suggestion does not fit your data
model, but from that comment I am a bit worried that your data is not
even close to normalised.

>
> Is there any way to delete the garbage flagged records? Such as a
> compact and repair option?
>

No, I mean the question does not make sense. If the records are
already flagged as garbage, then Firebird will NOT ask for more disk
space.

Perhaps one thing I did not make clear is that it is most likely not
the text taking up over 1GB of space. It is probably that the
database contains multiple copies of the same BLOB fields because
transactions need to be committed.

Run gstat on your database when it gets to the 1.5GB sort of size and
post it back to the group. I am guessing there will be a large gap
between the oldest interesting and oldest active transaction.

Adam