Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Online Compact and Rebuild

Online file compact and rebuild support is available starting with FairCom DB V13.

For background, since FairCom DB reclaims the space consumed by deleted records when new records are inserted and additionally for variable length files when records increase in size, a compact operation is typically only needed in the following scenarios:

  1. A compact operation is being used as a convenient way to reformat the file. For example, changing the PAGE_SIZE of the file, adding or removing encryption, adding or removing data compression or index compression, and so forth.
  2. A Hot Alter Table operation has been called and you want all the records converted to the latest schema version.
  3. A large number of records have been deleted and the disk space consumed by the deleted records is needed immediately. You do not want to wait until new records are inserted to reclaim the space.

The FairCom compact and rebuild operations available prior to V13 require files to be opened in exclusive mode. This is problematic for systems that have minimal windows available for downtimes, therefore an online facility for managing these processes is now available.

The online compact and rebuild operations allow for the files to be actively used by other users while these operations take place. These operations are generally slower than the compact and rebuild versions that require the file to be opened exclusively.

Online compression is not allowed for changing encryption or compression settings.

During an online compact operation, if the file is under full transaction control, the indexes are automatically rebuilt using Online Rebuild.

Online Rebuild is only available for indexes under full transaction control (ctTRNLOG file mode).

See also