All Products
Search
Document Center

PolarDB:Use the Simple storage policy

Last Updated:Mar 28, 2026

Spatio-temporal data types — grids, trajectories, and point clouds — produce large objects that strain default storage strategies. The Simple storage policy in GanosBase lets you apply a custom compression algorithm to these columns, reducing storage usage and improving query performance compared to the built-in options.

How it works

GanosBase provides a storage policy called Simple, designed specifically for spatio-temporal data. It uses a custom compression algorithm to compress data before storing, and keeps compressed data in basic (inline) tables if possible. This reduces storage costs and minimizes the impact on query performance.

The policy uses two settings that work together: a session-level Grand Unified Configuration (GUC) parameter that activates the policy engine, and a column-level storage attribute that applies it to a specific column.

Prerequisites

Before you begin, ensure that you have:

  • A GanosBase database with spatio-temporal data

  • A table with at least one spatio-temporal column (e.g., grid, trajectory, or point cloud type)

Enable the Simple storage policy

Step 1: Verify or toggle the GUC parameter

The GUC parameter polar_enable_storage_simple is enabled by default. To confirm the current state or change it, run one of the following statements:

-- Enable (default)
SET polar_enable_storage_simple = true;

-- Disable
SET polar_enable_storage_simple = false;

Step 2: Apply Simple storage to a column

Run ALTER TABLE to apply the Simple storage strategy to the target column:

ALTER TABLE tbname ALTER colname SET STORAGE SIMPLE;

Replace the placeholders with your actual values:

PlaceholderDescriptionExample
tbnameName of the table containing the spatio-temporal columngeo_data
colnameName of the column to apply the Simple policy totrajectory_col

After the statement runs, GanosBase automatically applies the custom compression algorithm to data written to colname.