ST_GetIndexParms

ST_GetIndexParms takes the index schema, index name, and grid level value for a spatial index as input parameters and returns the grid size that was used to define the index on the spatial column.

If there is no match found for the given input parameters, then null is returned.

Syntax

Read syntax diagramSkip visual syntax diagramdb2gse.ST_GetIndexParms(index_schemanull,index_name,grid_level )

Parameter

index_schema
A value of type VARCHAR(128) that identifies the schema in which the spatial index with the unqualified name index_name is in.

If this parameter is null, then the value of the CURRENT SCHEMA special register is used as the schema name for the spatial index.

index_name
A value of type VARCHAR(128) that contains the unqualified name of the spatial index for which the index parameters are returned.
grid_level
An INTEGER value that identifies the parameter whose value or values are to be returned. If this value is smaller than 1 or larger than 3, then an error is raised (SQLSTATE 38SQ1).

Return type

DOUBLE

Example

After creating a spatial index, you can use the following code example to return the grid size that was used to define the index on the spatial column.

SELECT DB2GSE.ST_GETINDEXPARMS('schema', 'PT_IDX', 1) 
FROM schema.DUMMY;