Enabling row compression on large Content Platform Engine database tables can
improve application response times.
Complete the following procedure to enable row compression
in a DB2® database table:
- Run the following command:
ALTER
TABLE table_name COMPRESS YES;
- If the table is not empty, run the REORG command after
ALTER command:
REORG TABLE table_name ALLOW
READ ACCESS;
The ALTER TABLE command (as shown) makes the specified table
eligible for compression. The REORG TABLE command (as shown) manually
generates a compression dictionary for the specified table, which
essentially initiates compression.
Note: Indexes (that support compression)
that are added to a table after the table is enabled for compression
are automatically compressed. You must explicitly disable compression
for that index if you do not want it to be compressed.