Spatial Indexes
This chapter describes Spatial indexes provided by Tibero Spatial. The indexes are implemented in RTREE format and used to improve the performance of spatial queries. There are indexes for the planar
Creating Spatial Indexes
The following describes how to create a Spatial index.
Usage
index_name
Name of a Spatial index.
schema_name
Owner of a table for which an index is created.
table_name
Name of a table for which an index is created.
col_name
Name of a GEOMETRY type column for which an index is created.
RTREE
Indicates an RTREE index.
Example
Spatial Index Constraints
Spatial indexes have the following constraints.
A single index cannot be used for multiple columns.
A Spatial index cannot be partitioned.
A Spatial index cannot be created for non-GEOMETRY type columns.
A Spatial index can be used only when the following functions are implemented in a WHERE clause of SQL statements. - ST_CONTAINS - ST_COVEREDBY - ST_COVERS - ST_CROSSES - ST_DWITHIN - ST_EQUALS - ST_INTERSECTS - ST_OVERLAPS - ST_TOUCHES - ST_WITHIN
A Spatial index of the spheroid coordinate system can be created by adding a constraint to the GEOMETRY column of the table.
Usage
Example
In some cases, it is necessary to change the coordinate system of the existing GEOMETRY column and create a Spatial index. If there are existing constraints, delete them, change the SRID of GEOMETRY, and then add appropriate constraints for the SRID to create the Spatial index.
Usage
Example
Dropping Spatial Indexes
The following describes how to drop a Spatial index.
The method is the same as for other indexes.
Usage
index_name
Name of an index to drop
Last updated