Considerations for table space compression


For LOAD REPLACE or LOAD RESUME YES PART n REPLACE, the value of the KEEPDICTIONARY installation option determines how LOADPLUS handles compression at a global level. However, you can override this value by specifying the KEEPDICTIONARY command option at either the table space or partition level. If you specify the KEEPDICTIONARY command option without a value, LOADPLUS assumes KEEPDICTIONARY YES, regardless of the value of the installation option. For more information, see KEEPDICTIONARY, INTO-TABLE, and KEEPDICTIONARY=NO

Considerations when using table space compression

The following additional considerations apply when you use table space compression with LOADPLUS:

  • When both of the following conditions exist, specify a single subsystem ID (SSID) for your load job instead of a group attachment name. Ensure that the Db2 version of the SSID that you specify corresponds to the version of the Db2 load library that you specify in your STEPLIB.
    • You are running LOADPLUS in a data-sharing environment.
    • The subsystems in your data sharing group are not all at the same Db2 version level.
  • Loading a large number of compressed partitions might result in constrained resources. If you encounter this problem, consider specifying smaller groups of partitions in multiple load steps.
  • When LOADPLUS invokes DSNUTILB, compression is handled by DSNUTILB. For information about how compression is handled for these jobs, see the documentation for the LOAD utility in the IBM Db2 Utility Guide and Reference.
  • When you are loading a partition-by-growth table space and LOADPLUS adds partitions, the compression dictionary used for the new partitions depends on the type of load that you are running:
    • For LOAD REPLACE, LOADPLUS uses the dictionary from the first partition.
    • For LOAD RESUME YES, LOADPLUS uses the dictionary from the partition in which the load started adding rows.
  • LOADPLUS supports compression for XML data.
  • LOADPLUS reports the percentage of compressed rows in messages BMC50512I and BMC50522I. This percentage does not include rows that are compressed by an EDITPROC. 

Considerations when building a dictionary

LOADPLUS builds a new dictionary based on the following criteria:

  • For LOAD REPLACE or LOAD RESUME YES PART n REPLACE jobs, LOADPLUS builds a new dictionary when any of the following conditions exist:
    • The value of KEEPDICTIONARY is NO.
    • The value of KEEPDICTIONARY is YES, and one of the following conditions exists:
      • A dictionary does not exist or the existing dictionary is unusable.
      • LOADPLUS is converting your data from BRF to RRF, and the value of the Db2 subsystem parameter HONOR_KEEPDICTIONARY is NO.
  • For LOAD RESUME YES jobs (without PART n REPLACE) on partitioned table spaces, LOADPLUS builds a new dictionary if the table space or partition is empty and a compression dictionary does not currently exist for the table space or partition. LOADPLUS builds a dictionary regardless of the value of the KEEPDICTIONARY option.

    Important

    For a partition-by-growth table space, if the first partition has a compression dictionary and any of the subsequent partitions are empty, LOADPLUS copies the dictionary from the first partition instead of building a new dictionary.

LOADPLUS builds the compression dictionary during the PRELOAD phase for a two-phase load and during the COMBINED phase for a single-phase load. After completely building the dictionary, LOADPLUS compresses the data. For a two-phase load, LOADPLUS stores the dictionary in the BMCDICT table between phases.

Important

LOADPLUS stores a dictionary in BMCDICT for each partition that you are loading. If you are loading a table space with a large number of partitions, you might need to increase the size of the BMCDICT table space from the standard size that was allocated during installation.

Note the following considerations when building a dictionary:

  • LOADPLUS reserves enough pages for the largest dictionary size.
  • If LOADPLUS does not load enough rows to create a full dictionary, LOADPLUS:
    • Does not compress any rows
    • Builds a non-optimal dictionary for future utility use 

Considerations when keeping a dictionary

If a dictionary already exists, LOADPLUS keeps the existing dictionary and uses it for compression when either of the following conditions exists:

  • For LOAD REPLACE or LOAD RESUME YES PART n REPLACE jobs, the value of KEEPDICTIONARY is YES
  • For LOAD RESUME YES jobs (without PART n REPLACE)

    Important

    If the existing dictionary is unusable, LOADPLUS continues but does not compress any rows.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*