Subject Re: [firebird-support] How does sweeping works?
Author Daniel Vogelbacher
On [Wed, 26.08.2009 20:16], Dimitry Sibiryakov wrote:
> > If I understand all the documention about sweeping right,
> > deleted row-space is reused for insertion.
> > Row-space which was free'd by a rollback only becomes reused if a
> > database sweep runs.
> > The database size never shrinks (like on VACUUM in other db systems),
> > thats only possible with backup&restore.
> > ...right?
>
> Wrong. Space is reused after garbage collection, not sweep. Sweep
> causes garbage collection, right, but GC may start without sweep.
> Sweep is required to clean up badly finished transactions. And sweep
> interval doesn't mean number of transactions between two sweeps, but
> difference between oldest interested transaction (OIT) and next
> transaction numbers. When this gap grows because of badly programmed
> client application or accidents, automatic sweep is started, moving (if
> possible) OIT marker.

If 1000 rows deleted by a commited transaction, is the space available
immediately or only after GC runs?

Does the GC starts automatically (configurable?) or/and is it possible to
start GC manually (without running sweep)?

Is GC/sweeping required for fast select queries?


Daniel


--
web: http://daniel.vogelbacher.name
irc: cytrinox @ (freenode|ircnet|quakenet)