📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

Spatial Index



Spatial indexes in TiDB Cloud Lake accelerate spatial predicate filtering on GEOMETRY columns. They are designed for Fuse tables and help the optimizer prune blocks before evaluating exact spatial functions.

Spatial Index Management

CommandDescription
CREATE SPATIAL INDEXCreates a new spatial index on one or more GEOMETRY columns
REFRESH SPATIAL INDEXBackfills spatial index data for rows that existed before index creation
DROP SPATIAL INDEXRemoves a spatial index from a table

Supported Predicates

TiDB Cloud Lake can use spatial indexes to accelerate queries built with these spatial predicates:

  • ST_CONTAINS
  • ST_INTERSECTS
  • ST_WITHIN
  • ST_DWITHIN

Limitations

  • Spatial indexes are supported on Fuse tables.
  • Indexed columns must be of type GEOMETRY.
  • GEOGRAPHY columns are not supported.

Was this page helpful?