R-tree indexes

An index organizes access to data so that entries can be found quickly, without searching every row. The R-tree access method enables you to index multidimensional objects.

Queries that use an index execute more quickly and provide a significant performance improvement. The R-tree access method speeds access to multidimensional data. It organizes data in a tree-shaped structure, with bounding boxes at the nodes. Bounding boxes indicate the farthest extent of the data that is connected to the subtree below.

A search using an R-tree index can quickly descend the tree to find objects in the general area of interest and then perform more exact tests on the objects themselves. An R-tree index can improve performance because it eliminates the need to examine objects outside the area of interest. Without an R-tree index, a query would need to evaluate every object to find those that match the query criteria.

When you create an index, you can specify an access method and an operator class (if you do not specify an access method, the default B-tree access method is used). The access method organizes the data in a way that speeds up access. The operator class is used by the optimizer to determine whether to use an index in a query.

To create an R-tree index, you must specify an operator class that supports an R-tree index on the data type you want to index. The operator class you use for HCL® OneDB® spatial data types is ST_Geometry_Ops.

The B-tree access method creates a one dimensional ordering that speeds access to traditional numeric or character data. You can use B-tree to index a column of non-spatial data or to create a functional index on the results of a spatial function that returns numeric or character data. For example, you could create a functional B-tree index on the results of the ST_NumPoints() function because ST_NumPoints() returns an integer value.
Restriction: The B-tree access method indexes numeric and character data only. You cannot use the B-tree access method to index spatial data.

The syntax for creating an index is described in detail in the CREATE INDEX statement in HCL OneDB Guide to SQL: Syntax.

For a detailed description of R-tree indexes, refer to the R-Tree Index User's Guide.