Subject | Re: [firebird-support] Re: GBAK hangs with GC |
---|---|
Author | Ann W. Harrison |
Post date | 2006-09-19T18:49:25Z |
Stefan Heymann wrote:
Once their changes have been removed from the database, they can
be marked as committed. That reduces the number of transactions
that need to be handled specially and improves performance,
slightly. So, either backup first then the sweep will be fast,
or sweep first so the backup won't have any garbage collection
to do.
By the way, garbage collection happens when a transaction visits
a record - the record retrieval code always looks for unneeded
old versions, unless the transaction is started with an option
not to garbage collect. So gbak doesn't do a garbage collect
pass before backing up - the whole thing happens at once.
As a final note, the expensive part of garbage collection for
V1.5 databases is index cleanup. If indexes can be disabled
after the delete and re-enabled after the cleanup, the process
will be much faster.
Regards,
Ann
>Sweep also resets the state of transactions that were rolled back.
>
> So when I have a nightly backup I can set the Sweep Interval to 0
> without having to do scheduled sweeps?
>
Once their changes have been removed from the database, they can
be marked as committed. That reduces the number of transactions
that need to be handled specially and improves performance,
slightly. So, either backup first then the sweep will be fast,
or sweep first so the backup won't have any garbage collection
to do.
By the way, garbage collection happens when a transaction visits
a record - the record retrieval code always looks for unneeded
old versions, unless the transaction is started with an option
not to garbage collect. So gbak doesn't do a garbage collect
pass before backing up - the whole thing happens at once.
As a final note, the expensive part of garbage collection for
V1.5 databases is index cleanup. If indexes can be disabled
after the delete and re-enabled after the cleanup, the process
will be much faster.
Regards,
Ann