Compressing data by using the LOAD utility
You can use LOAD to compress data in a table space or partition that is defined with COMPRESS YES. LOAD first builds a compression dictionary. After the dictionary is built, the data is compressed as it is loaded. If a compression dictionary already exists, you can specify that LOAD not build a new one.
Alternatively, you can run the REORG TABLESPACE utility to compress your data.
Before you begin
Your table space or partition in a partitioned table space must be defined with COMPRESS YES before you can compress the data by using LOAD.
About this task
LOAD creates a compression dictionary while records are loaded. The data is not compressed until the dictionary is built. To save processing costs, the initial LOAD does not go back to compress the records that were used to build the dictionary. After the dictionary is built, the rest of the data is compressed as it is loaded.
The number of records that are required to
build a dictionary depends on the frequency of patterns in the data. For large data sets, a small
percentage of the total number of rows is used to build the dictionary. For the best compression
results, build a new dictionary whenever you load the data. If a table has DATA CAPTURE CHANGES
active, any previously existing dictionary is written to the log.
For partition-by-growth table spaces, the utility builds one dictionary and the same dictionary page is populated through all partitions.
For XML table spaces that are defined with COMPRESS YES, compression does not occur until the first time that the REORG TABLESPACE utility is run on that table space.
Procedure
To compress data by using the LOAD utility:
What to do next
For XML table spaces, run REORG TABLESPACE on the table space.