Subject RE: [firebird-support] Can stopping the Firebird Server damage database if a sweep is being performed
Author Leyne, Sean
Alan,

> > I plan to make the sweep a manual process ie sweep interval set to 0
> > and do the backup/restore manually.

...

> With a well behaved application the 20,000 limit may very rarely be
> breached.

You have blended 2 separate issues here.

All applications, well behaved or not, will run into the 20,000 *interval* as this is the number of transactions since the last sweep.

A poorly behave application will not use proper transaction management are create conditions where the difference between the OAT and the current transaction is always growing. This condition prevents the normal garbage collection process from running (assuming the appropriate engine config settings), which in turns leads to slower and slower database performance.

Whether a sweep needs to do much work is dependent on the garbage collection settings, the data usage/update patterns of the application and the proper transaction management.

If the application (A) updates 100,000,000 rows in 1 transaction vs (B) updating 100 rows in 1,000,000 transaction will have completely different sweep profiles. If garbage collection is active then for A the sweep will need to cleanup 100,000,000 rows, for B sweep will only cleanup 100 records (all the other back-versions will have been cleaned up by each of the transactions).


Sean