Use this stored procedure to create an index for a spatial column.
For an example of the code for invoking this stored procedure, see the C function gseEnableIdx in the sample program. For information about this program, see Writing applications for DB2 Spatial Extender.
The user ID under which this stored procedure is invoked must hold one of the following authorities or privileges:
Input parameters
Table 14. Input parameters for the db2gse.gse_enable_idx stored procedure.
Name | Data type | Description |
---|---|---|
layerSchema | VARCHAR(30) | Name of the schema to which the table specified in the layerTable
parameter belongs.
This parameter is nullable. Comment: If you do not supply a value for the layerSchema parameter, it will default to the user ID under which the db2gse.gse_enable_idx stored procedure is invoked. |
layerTable | VARCHAR(128) | Name of the table on which the index that you are creating is to be
defined.
This parameter is not nullable. |
layerColumn | VARCHAR(128) | Name of the spatially enabled column that is to be searched with the aid
of the index that you are creating.
This parameter is not nullable. |
indexName | VARCHAR(128) | Name of the index that is to be created.
This parameter is not nullable. Comment: Do not specify a schema name. DB2 Spatial Extender automatically assigns the index to the schema referenced by the layerSchema parameter. |
gridSize1 | DOUBLE | Number that indicates what the granularity of the finest index grid
should be.
This parameter is not nullable. |
gridSize2 | DOUBLE | Number that denotes either (1) that there is to be no second grid for
this index or (2) what the granularity of the second grid should be.
This parameter is nullable. Comment: If there is to be no second grid, specify 0. If you want a second grid, it must be less granular than the grid denoted by gridSize1. |
gridSize3 | DOUBLE | Number that denotes either (1) that there is to be no third grid for this
index or (2) what the granularity of the third grid should be.
This parameter is nullable. Comment: If there is to be no third grid, specify 0. If you want a third grid, it must be less granular than the grid denoted by gridSize2. |
Output parameters
Table 15. Output parameters for the db2gse.gse_enable_idx stored procedure.
Name | Data type | Description |
---|---|---|
msgCode | INTEGER | Code associated with the messages that the caller of this stored procedure can return. |
Reserved | VARCHAR(1024) | Complete error message, as constructed at the DB2 Spatial Extender server. |