Performing an Immediate Database Sweep

From InterBase
Jump to: navigation, search

Go Up to Sweep Interval and Automated Housekeeping


You can perform an immediate database sweep with any of the following methods:

  • Right click a connected database in the Tree pane and choose Maintenance|Sweep from the context menu.
  • Select a connected database in the Tree pane and double-click Sweep in the Work pane.
  • enter the following command:
gfix -sweep

This operation runs an immediate sweep of the database, releasing space held by records that were rolled back and by out-of-date record versions. Sweeps are also done automatically at a specified interval.

Sweeping a database does not strictly require it to be shut down. You can perform sweeping at any time, but it can impact system performance and should be done when it inconveniences users the least.

If a sweep is performed as an exclusive operation on the database, there is additional tuning that the procedure performs. As long as there are no outstanding active transactions, the sweep updates the state of data records and the state of the inventory of past transactions. Non-committed transactions are finally rendered obsolete, and internal data structures need not track them in order to maintain snapshots of database versions. The benefit of this is a reduction of memory use, and a noticeable performance improvement.

Advance To: