The Sybase IQ recovery mechanism is designed for the data warehouse. Typically in this environment, few transactions occur, but each transaction can be quite time consuming.
To best suit this model, Sybase IQ performs database updates by making them on a copy of the actual database page, and then writes the data to disk whenever a write transaction commits. It also records the following information:
The location and quantity of changed data for each transaction. It stores this information in a transaction log.
The location of any version pages and free space on disk. It uses this information to free up space when versions are no longer needed. All versions created throughout the duration of a write transaction become obsolete when the write transaction commits or rolls back. Individual versions can be released at a savepoint.
Additional information about checkpoints that occurred during a transaction.
When you need to recover your database, instead of repeating all of the lengthy transactions that have occurred, Sybase IQ restores quickly from the information in the transaction log and the checkpoint information. It uses the information about versions and free space to roll back transactions, and to release the disk space occupied by obsolete versions.
The transaction log requires very little space: only about 128 bytes for each committed transaction. The space requirements for checkpoint and disk space availability information are also very small. However, the transaction log continues to grow in size. In systems with a high number of transactions that change data, the log can grow to be very large over a period of time, requiring periodic truncation of the log. See “The transaction log file” in Chapter 4, “Managing System Resources,” in the Performance and Tuning Guide for information on truncating the transaction log file in running databases, multiplex databases, and non-multiplex databases.
The checkpoint information is deleted at the next checkpoint. Information related to particular savepoints is deleted when the savepoint is released or rolled back.
For other concurrency issues relating to backing up and restoring databases, see “Running backups”.