Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Additional Single-User Transaction capabilities

The following additional single-user controls are available. Server configuration file keywords are repeated prior to the method for implementing in single-user mode:

  1. It is possible to load one or more transaction logs into memory during automatic recovery to speed the recovery process. The keyword RECOVER_MEMLOG may be placed into the configuration file with an argument, which specifies the maximum number of memory, logs to load into memory during automatic recovery (default is 0).

    RECOVER_MEMLOG <# of logs to load>

    In FairCom DB single-user, transaction processing mode, the global variable ctlogmem should be set to one (1), and ctlogmemmax should be set to the maximum number of logs to load into memory.

  2. The CHECKPOINT_INTERVAL keyword can speed up recovery at the expense of performance during updates. The interval between checkpoints (transaction processing only) is measured in bytes of log entries. It is ordinarily about one-third (1/3) the size of one of the active log files (L000....FCS). Reducing the interval will speed up automatic recovery at the expense of performance during updates (default is 833333).

    CHECKPOINT_INTERVAL <interval in bytes>

    For example, adding CHECKPOINT_INTERVAL 150000 to the configuration file will cause checkpoints about every 150,000 bytes of log file.

    In FairCom DB single-user, transaction processing mode set the LONG global variable ctlogchklmt to the desired value.

  3. Faster index automatic recovery is available through the index file mode, ctLOGIDX. Transaction controlled indexes with this file mode are recovered more quickly than with the standard transaction processing file mode ctTRNLOG. This feature can significantly reduced recovery times for large indexes and should have minimal affect on the speed of index operations.

    ctLOGIDX is only meaningful if the file mode also includes ctTRNLOG. Note that ctLOGIDX is intended for index files only! Do not use ctLOGIDX with data files.

    ctLOGIDX must defined prior to building single-user FairCom DB library.

    ctLOGIDX support may be forced on, off or disabled with the FORCE_LOGIDX server configuration file entry.

    FORCE_LOGIDX <ON | OFF | NO>

    • ON forces all indexes to use the ctLOGIDX entries;
    • OFF forces all indexes not to use ctLOGIDX entries;
    • NO allows existing file modes to control the ctLOGIDX entries and is the default.

In FairCom DB single-user transaction processing mode, set the global variable ctlogidxfrc as follows: 1 for ON, 2 for OFF and 0 for NO. If ctNOGLOBALS is in use, then either the CTVAR structure must be allocated, (typically by calling RegisterCtree()), prior to the FairCom DB initialization call, (so that the member corresponding to ctlogidxfrc can be set), or setting ctlogidxfrc must be delayed until after the initial call to FairCom DB. If delayed, then turning ctLOGIDX entries off (ctlogidxfrc == 2) cannot be done until after the initialization call and its possible need for automatic recovery.

TOCIndex