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 mode, ctDEFERBEG, to the c-tree API function Begin(), which is used to begin a transaction. ctDEFERBEG, causes the actual transaction begin entry in the transaction log to be delayed until an attempt is made to update a transaction-controlled file. 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 c-treeSQL SELECT statements performed in auto-commit mode involved transaction log activity due to the transaction begin and abort calls. The c-treeSQL engine now includes the ctDEFERBEG, mode in transaction begin calls, eliminating transaction log I/O for transactions that do not involve updates.
If your ISAM or c-treeDB applications begin transactions that might not involve updates, consider adding the ctDEFERBEG, mode to your transaction begin calls.
|