Large spatio-temporal objects — such as geometries or trajectory data — can be tens of kilobytes or larger. When you run spatio-temporal index builds or spatial joins, the database reads every row it scans, including the full object payload. This drives up I/O and slows query execution.
GanosBase addresses this by splitting each qualifying object at write time: the object's feature signature (a compact representation of its spatial and temporal properties) drives the split, placing metadata in-row and full entity data off-row. Index scans and join operations then read only the small in-row metadata. The full object is fetched separately, only when needed, which reduces I/O and improves processing performance.
How it works
When a large spatio-temporal object exceeds a configurable byte threshold, GanosBase stores it in two parts:
| Part | Storage location | Read during index scan or spatial join |
|---|---|---|
| Metadata (feature signature) | In-row | Yes — always read |
| Full entity data | Off-row | No — fetched on demand |
This separation means that operations such as spatio-temporal index creation and spatial joins process only compact in-row metadata, not the full object payload, reducing I/O proportionally.
Prerequisites
Before you begin, ensure that you have:
A PolarDB cluster that you can connect to
Enable or disable storage optimization
Storage optimization is disabled by default. To enable it, run the following command after connecting to your PolarDB cluster:
set polar_enable_storage_partial = true;To disable it:
set polar_enable_storage_partial = false;Set the size threshold
When storage optimization is enabled, PolarDB applies in-row/off-row splitting only to objects whose size exceeds polar_partial_external_threshold (measured in bytes).
| Parameter | Default | Range |
|---|---|---|
polar_partial_external_threshold | 2000 | 1000–8000 |
Set this parameter before creating a table.
To set the threshold:
set polar_partial_external_threshold = 3000;