how does openGauss choose compression algorithm to compress data?

41 Views Asked by At

I learned dev doc. the create table command contains usage parameters. One of them is called [ COMPRESS | NOCOMPRESS ] as this following:

CREATE [ [ GLOBAL | LOCAL ] [ TEMPORARY | TEMP ] | UNLOGGED ] TABLE table_name
    [ (column_name [, ...] ) ]
    [ WITH ( {storage_parameter = value} [, ... ] ) ]
    [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
    [ COMPRESS | NOCOMPRESS ]
    [ TABLESPACE tablespace_name ]
    AS query
    [ WITH [ NO ] DATA ];

So when I use it, which compression algorithm would openGauss to choose to use for different data type?

1

There are 1 best solutions below

0
On

As we know. openGauss supports many kinds of compression algorithms include RLE、DELTA、BYTEPACK/BITPACK、LZ4、ZLIB、LOCAL DICTIONARY. It would find out suitable algorithm for different data type. detail information is below:

https://opengauss.org/en/docs/2.0.0/docs/CharacteristicDescription/adaptive-compression.html