Use the Simple storage policy

Updated at:

This topic describes how to use the Simple storage policy in the spatio-temporal database Ganos.

Background information

Spatio-temporal data features large individual sizes and large overall volumes. Data types such as raster, trajectory, and point cloud in Ganos typically need to be compressed by professional compression algorithms before they are stored in database tables. However, the storage policies provided by the database support only fixed and simple compression algorithms, or store data uncompressed in foreign tables. As a result, spatio-temporal data consumes a large amount of storage space and affects query performance.

Therefore, Ganos provides an extended storage policy, namely the Simple storage policy. This policy allows you to compress data by using custom compression algorithms and store the compressed data in base tables as much as possible, so that storage costs are reduced and the impact on query performance is minimized.

Usage

Set the GUC parameter. This parameter is enabled by default.

  • Run the following statement to enable the GUC parameter:

    SET polar_enable_storage_simple=true;
  • Run the following statement to disable the GUC parameter:

    SET polar_enable_storage_simple=false;

Set the storage type of the specified column in a table to storage simple. Example:

ALTER TABLE tbname ALTER colname SET storage simple;

After the setting is complete, the colname column is automatically stored by using the Simple storage policy.