Sweep Interval and Automated Housekeeping

From InterBase

Go Up to Database Configuration and Maintenance


Sweeping a database is a systematic way of removing outdated records. Periodic sweeping prevents a database from growing too large. In the past, sweeping slowed system performance and users disabled the automatic database sweep function because of the impact on product operations.

InterBase databases periodically need to be swept. Otherwise, the main memory allocated for the bitmap of each translation increases to the point where performance becomes unacceptable. The longer sweep takes to complete, the more main memory requirements increase for starting new transactions.

Fast Sweep

With the implementation of the fast sweep optimization starting with InterBase XE, the memory allocation issue has been mitigated. The user has the option to configure their databases for automatic sweep. In cases where large databases have large archival or infrequently modified tables, a database sweep will have minimal impact on the performance of running transactional operations.

Only ODS 15 and later databases can perform fast database sweeps. The effectiveness of a fast sweep is directly proportional to the fraction of database data pages that have been modified since the last sweep. If every data page has been changed, fast sweep is no faster than the former methodology. If very few pages are changed, fast sweep is nearly instantaneous. If half the pages were updated, fast sweep is then half the former sweep time.

Starting with InterBase XE7, any database that you restore is immediately marked as swept, therefore the first sweep of that database is a fast sweep. This feature is available starting with InterBase XE7 and onwards.

There is no new user interface or action required by the user to enable fast sweep functionality. Manual sweep initiated by the GFIX command line tool, IBConsole, or programmatically, as well as automatic sweep configuration on a database, use the fast sweep mechanism.

As a database administrator, you can tune database sweeping, balancing its advantages and disadvantages to best satisfy the needs of the users.

Topics

Advance To: