In PostgreSQL, filtering rows with a spatial operator forces the database to fetch each geometry from the TOAST table to compare bounding boxes—even when only a handful of rows match. For tables with high-resolution geometries (such as administrative boundaries or dense trajectory data), this means reading thousands of TOAST pages for a scan that touches only a few rows.
GanosBase addresses this by splitting each large spatio-temporal object into two parts: a compact feature signature (such as a bounding box) stored in-row, and the full entity data stored off-row. Index creation and spatial joins read only the lightweight in-row signature, skipping TOAST retrieval entirely. The full geometry is fetched only when the query actually needs it.
Enable or disable the feature
Connect to your PolarDB cluster, then set the polar_enable_storage_partial Grand Unified Configuration (GUC) parameter. The feature is disabled by default.
To enable:
SET polar_enable_storage_partial = true;To disable:
SET polar_enable_storage_partial = false;Configure the size threshold
When the feature is enabled, GanosBase applies in-row/off-row splitting only to objects whose size exceeds the polar_partial_external_threshold value (in bytes). Objects at or below the threshold are stored using the standard strategy.
| Parameter | Range | Default |
|---|---|---|
polar_partial_external_threshold | 1000–8000 | 2000 |
Set the threshold before creating a table:
SET polar_partial_external_threshold = 3000;