Create spatial grid indexes to define two-dimensional grid
indexes on spatial columns to help optimize spatial queries.
About this task
Restriction:
The same restrictions
for creating indexes using the CREATE INDEX statement are in effect
when you create a spatial grid index. That is, the column on which
you create an index must be a base table column, not a view column
or a nickname column. The DB2 database
system will resolve aliases in the process.
You create spatial
grid indexes to improve the performance of queries on spatial columns.
When
you create a spatial grid index, you give it the following information:
- A name
- The name of the spatial column on which it is to be defined
- The combination of the three grid sizes helps optimize performance
by minimizing the total number of index entries and the number of
index entries that need to be scanned to satisfy a query.
You can create a spatial grid index in one of the following
ways:
- Use the Spatial Extender window of the DB2 Control Center.
- Use the SQL CREATE INDEX statement with the db2gse.spatial_index
extension in the EXTEND USING clause.
- Use a GIS tool that works with DB2 Spatial
Extender. If you use such a tool to create the index, the tool will
issue the appropriate SQL CREATE INDEX statement.
This topic presents the steps for the first two methods.
For information about using a GIS tool to create a spatial grid index,
see the documentation that comes with that tool.
To do this task... :