Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

PreImage Transaction Processing

PreImage Transaction Processing (also called PREIMG or "pre-image") provides high-speed and guaranteed atomic transactions without transaction logging. PreImage Transaction Processing enjoys many of the benefits of transaction control, including full commit and rollback, with a relatively small increase in processing overhead.

Unlike Full Transaction Processing, file updates are not logged to the server’s transaction logs. For this reason, PreImage files are not recoverable in the event of an abnormal server termination. In such a situation, a PreImage file is in an unknown state because an unknown number of updates may have not yet been written to disk at the time of the abnormal server termination.

Because automatic recovery does not process PreImage files, a PreImage file rebuilt after an abnormal server termination is not guaranteed to be in a consistent transaction state. In such a situation, PreImage files could contain data that was in the process of being committed but for which the commit had not yet been completed.

Because no protection from catastrophic failure is provided, it is important to provide other means for data recovery when using this mode.


PreImage Transaction Processing

Previous Topic

Next Topic

When to Use PREIMG Files

The benefit of PREIMG is that it avoids the overhead associated with writing to and flushing the transaction logs. If atomicity is required for a file but recoverability is not, PREIMG may be an appropriate choice. Some specific cases in which PREIMG may be appropriate include:

  • Using TRNLOG data files and PREIMG indexes if you are willing to rebuild the indexes after an abnormal server termination.
  • Using PREIMG on files that can be re-created in the event of an abnormal server termination.

To minimize loss of unwritten cached PREIMG file updates in the event of an abnormal server termination, consider using WRITETHRU for PREIMG files or periodically calling the FairCom DB API function CtreeFlushFile() to flush PREIMG data and index cache pages to disk.

TOCIndex