Start of change

Expansion dictionaries for decompressing table space data in log records in replication applications

Expansion dictionaries are used to decompress table space data before the data is returned in log records.

Expansion dictionaries are stored in the compressed table spaces, and can also be stored in the compression dictionary data set (CDDS).

Up to three versions of the expansion dictionary for each compressed table space can be stored in the CDDS. When expansion dictionaries are stored in the CDDS, the CDDS also contains:
  • Status information for the CDDS.
  • An exclusion list. The exclusion list holds information about failed insertions of expansion dictionaries into the CDDS.
The following actions cause expansion dictionaries to be stored in the CDDS when subsystem parameter CDDS_MODE is set to SOURCE_ONLY:
  • LOAD is run on a compressed table space or partition that contains one or more tables that are defined with DATA CAPTURE CHANGES.
  • REORG TABLESPACE is run on a compressed table space or partition that contains one or more tables that are defined with DATA CAPTURE CHANGES.

    If the INITCDDS option is specified in the REORG TABLESPACE control statement, the table space is not reorganized. REORG inserts the current expansion dictionary from the table space, the prior expansion dictionary from the log, or both expansion dictionaries into the CDDS. If there is an existing expansion dictionary in the CDDS for the table space or partition that is being reorganized, the existing expansion dictionary is removed before the new dictionaries are inserted.

  • An SQL INSERT statement is run on a table that is defined with DATA CAPTURE CHANGES, and the table is in a compressed table space. When Db2 builds an expansion dictionary during the insertion process, the expansion dictionary is inserted into the CDDS.
Storing expansion dictionaries in the CDDS has the following advantages for decompressing log records for replication applications:
  • Compressed table spaces that are referenced in retrieved log records do not need to be opened when the table space data is decompressed, which has the following advantages:
    • In a data sharing environment, when the table spaces are not open, they do not become GBP-dependent.
    • Decompression failures because the table spaces are in the STOP state do not occur.
  • Db2 does not need to obtain a DBD lock or claim on the referenced table spaces. This lessens the occurrence of serialization issues with concurrently running data definition statements or utilities.
  • Db2 does not need to access expansion dictionaries from the logs. There is less performance degradation due to retrieval of the logs, especially when archive logs are on tape.
End of change