Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

Deferred Flush of Transaction Begin

It is not uncommon for a higher-level application API to start transactions without knowledge of whether or not any updates will occur. To reduce the overhead of unnecessary log flushes, FairCom added a new transaction mode, ctDEFERBEG, to the c-tree API function Begin(), used to begin a transaction. ctDEFERBEG causes the actual transaction begin entry in the log to be delayed until an attempt is made to update a transaction-controlled file, and if a transaction commit or abort is called without any updates, then the transaction begin and end log entries are not flushed to disk.

FairCom applied this change after finding that FairCom DB SQL SELECT statements performed in auto-commit mode involved transaction log activity due to transaction begin and abort calls. FairCom DB SQL now includes this ctDEFERBEG mode in transaction begin calls, eliminating transaction log I/O for transactions that do not involve updates. If your application begins transactions that might not involve updates, consider adding ctDEFERBEG to your transaction begin calls.