Spatial indexes
Good query performance is related to having efficient indexes defined on the columns of the base tables in a database.
The performance of the query is directly related to how quickly values in the column can be found during the query. Queries that use an index can execute more quickly and can provide a significant performance improvement.
You can gain performance improvements for data loading, index creation, and queries by using inline LOB columns to store certain types of geometries. These geometry types are ST_LineString, ST_Polygon, ST_MultiPoint, ST_MultiLineString and ST_MultiPolygon, which are based on the BLOB data type. However, inline LOB columns use more storage for a base table space than LOB or non-LOB columns.
Spatial queries are typically queries that involve two or more dimensions. For example, in a spatial query you might want to know if a point is included within an area (polygon). Due to the multidimensional nature of spatial queries, the Db2 native B-tree indexing is inefficient for these queries.
Spatial queries use a type of index called a spatial grid index. The indexing technology in IBM® Spatial Support for Db2 for z/OS® utilizes grid indexing, which is designed to index multidimensional spatial data, to index spatial columns. IBM Spatial Support for Db2 for z/OS provides a grid index that is optimized for two-dimensional data on a flat projection of the Earth.