Subject Re: [IB-Architect] Sweep and Garbage Collection
Author Jim Starkey
At 02:01 PM 1/24/03 -0000, Ian A. Newby <ian@...> wrote:
>Hi Folks,
> As far as I understand it, garbage collection removes old back
>versions in the database which are newer than the oldest interesting
>transaction.
>

Sweep is nothing more than a comprehensive pass touching every
record, forcing pending garbage collection, which allows it to
update the oldest interesting transaction. The only significant
benefit is it reduces the number of transaction inventory pages
that must be read to start a transaction. When visiting a
record, there is no difference between garbage collection and
sweep -- exactly the same code is executed.

Garbage collection, on the other hand, is ad hoc, performed when
every a record is visited.

The worst thing about sweep is explaining it over and over. A
major requirement for my next database system was to avoid sweep
in particular and any periodic maintenance in general. I now
use a scheme in which the database is multi-generational in memory
but not on disk. Garbage collection still takes place, but all
that happens in a change in state of a couple of million transistors.

Jim Starkey