Compressed Columns with Large Objects

Adaptive Server lets you create databases and compress columns that use the text, image, unitext, and java large object (LOB) datatypes.

LOB columns can contain up to 2,147,483,647 (or 231 -1) bytes of character or binary data. Adaptive Server stores LOB values on a text page chain. Adaptive Server compresses only text pages.

Adaptive Server uses the FastLZ (with LZO) and ZLib (with LZW.26) algorithm to compress LOB data. Both are dictionary-based compression techniques; that is, they replace repeated words on the data page with a status bit that points to the actual word in an index. The differences are:

Adaptive Server automatically determines the algorithm to use when you select the compression level. Levels 1 – 9 use the ZLib technique, and levels 100 and 101 use the FastLZ technique.

Generally, the higher the compression level, the more the LOB is compressed. However, the amount of compression depends on the content of the LOB. The higher the compression level, the more CPU-intensive the process, so a compression_level of 9 provides the best compression ratio, but also the heaviest CPU usage.

You can combine table-level and column-level compression.

Combining Table- and Column-Level Compression

Compression Level

No Column Compression

Column is not compressed

Column uses compression_level Scale

No table-level compression

Uncompressed

Uncompressed

Column-level compression

lob_compression = 0

Uncompressed

Uncompressed

Column-level compression

lob_compression is the same as the table-level compression

Column level compression

Uncompressed

Column-level compression

Adaptive Server alters the page layout when it compresses LOB columns.