DB2 Version 10.1 for Linux, UNIX, and Windows

Table compression

You can use less disk space for your tables by taking advantage of the DB2® table compression capabilities. Compression saves disk storage space by using fewer database pages to store data.

Also, because you can store more rows per page, fewer pages must be read to access the same amount of data. Therefore, queries on a compressed table need fewer I/O operations to access the same amount of data. Since there are more rows of data on a buffer pool page, the likelihood that needed rows are in the buffer pool increases. For this reason, compression can improve performance through improved buffer pool hit ratios. In a similar way, compression can also speed up backup and restore operations, as fewer pages of need to be transferred to the backup or restore the same amount of data.

You can use compression with both new and existing tables. Temporary tables are also compressed automatically, if the database manager deems it to be advantageous to do so.

There are two main types of data compression availble for tables:

For a particular table, you can use row compression and value compression together or individually. However, you can use only one type of row compression for a particular table.