Checkpoints, savepoints, and transaction rollback
304
Adaptive Server IQ relies on three transaction-related commands that help you
recover a stable set of data in the event of system or media failure. These
commands set checkpoints, set and release savepoints, and roll back
transactions.
Checkpoints
A checkpoint marks a significant point in a transaction, when Adaptive Server
IQ writes to disk certain information it tracks internally. It uses this information
in the event you need to recover your database.
Adaptive Server IQ uses checkpoints differently than OLTP databases such as
Adaptive Server Anywhere. OLTP databases tend to have short transactions,
that affect only a small number of rows. It would be very expensive for them
to write entire pages to disk. Instead, OLTP databases generally write to disk at
checkpoints, and write only the changed data rows.
As discussed in Chapter 1, “Overview of Adaptive Server IQ System
Administration”, Adaptive Server IQ is an OLAP database. A single OLAP
transaction can change thousands or millions of rows of data. For this reason,
Adaptive Server IQ does not wait for a checkpoint to occur to perform physical
writes. It writes updated data pages to disk after each transaction commits. For
an OLAP database, it is much more effective to write full pages of data to disk
than to write small amounts of data at arbitrary checkpoints.
Checkpoints aid in recovery
In order to recover from a system or media failure, Adaptive Server IQ must be
able to restore the database to a point where it is internally consistent. IQ uses
checkpoints to generate reference points and other information that it needs to
recover databases. The information that IQ writes to disk at each checkpoint is
essential to the recovery process.
When checkpoints occur
Most Adaptive Server IQ checkpoints occur automatically. You can also set
explicit checkpoints, although you do not need to do so.
A checkpoint occurs at the following times:
•
When a transaction issues a
CHECKPOINT
command.
•
When the
CHECKPOINT_TIME
is exceeded.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...