Specifying Buffered Logging
The following example creates a database that uses a buffered log:
CREATE DATABASE vehicles WITH BUFFERED LOG;
If transactions are made against a database that uses buffered
logging, the transaction log records are held in a logical-log memory
buffer for as long as possible. They are not flushed from this logical-log
buffer in shared memory to the logical log on disk until one of the
following situations occurs:
- The buffer is full.
- A transaction is committed on the database with unbuffered logging.
- A checkpoint occurs.
- The connection is closed.
If you use a buffered log, you marginally enhance the performance of logging at the risk of not being able to re-create the last few transactions after an assertion failure.
ANSI/ISO-compliant
databases cannot support buffered logging, but must be created with
the
LOG MODE ANSI
keywords:CREATE IF NOT EXISTS DATABASE nobuficles WITH LOG MODE ANSI;
See also the discussion of buffered logging in the HCL OneDB™ Database Design and Implementation Guide.