Subject Re: [firebird-support] garbage collect in backup
Author Ann W. Harrison
c_pradelli wrote:
>
> I have got some question about garbage collect and gbak:
>
> What is the benefit of do a garbage_collect on the database when I'm
> doing a backup with gbak?

If you plan to replace the database with one restored from the backup,
there's no benefit. If not, then removing unneeded back versions of
records will improve performance by limiting the growth of the database
and by avoiding the cost of garbage collection when the database is more
heavily used.

> Are there any difference in the backup file that I obtain from gbak
> if I use the -g[arbage_collect] switch or if I don't use it?

None.

> Why garbage_collect is enabled by default in gbak if there are other
> tools (gfix) for doing that explicitly?.

Garbage collection is enabled by default on all functions of the
database - all transactions, including read-only transactions either
perform garbage collection or produce lists of work for a separate
garbage collection thread. It's just good housekeeping - life is more
pleasant if you clean up messes as you find them rather than waiting
until the mess is intolerable, then stopping everything and doing a
massive cleanup.


Regards,


Ann