Search code examples
databasecompression

Does PieCloudDB offer data compression at the table level?


I am concerned about the storage space used by table data in my PieCloudDB database. Does PieCloudDB offer data compression at the table level? If it does, what types of compression are supported, and how can I set it up?


Solution

  • PieCloudDB Database utilizes the JANM engine for storing user data. This engine compresses and stores data in a columnar fashion, applying uniform compression techniques across all columns within a table. The table-level compression options currently supported include none, pglz, and zstd, with zstd being the default setting. Although data compression does require CPU resources, it can lead to a substantial reduction in disk space usage.

    The following is an example of configuring the table compression type to "pglz":

    CREATE TABLE foo (a INT, b TEXT) WITH (compresstype=pglz);