· Spatial index performance
1. Use of spatial indexes
There are generally two phases for spatial queries in a spatial database. For Oracle Spatial, a spatial query is divided into two steps, one called primary filter ), the second is secondary filter ). The primary filter first filters out a small part of data that may meet the spatial query through the MBR intersection of the rectangle from massive data, then, we use the specific spatial relationship algorithm in the filtering to determine which of the small result sets meet the spatial relationship. 12. During primary filtering, spatial indexes are used.
Figure
12 process of spatial query in Oracle Spatial
For ArcSDE, the principle is similar. In ArcSDE, there is a function named st_envintersects. This is to filter a small part of the data within a rectangle from massive data through the coordinate of the four corners. For other general spatial operations, such as st_within, If you create a spatial index for your data, this operation will first find a small dataset through the spatial index (equivalent to the st_envintersects operation, or the primary filter in Oracle Spatial), and then use the specific "within" spatial relationship algorithm to query the accurate results (equivalent to the Secondary Filter in Oracle Spatial ). Of course, if data does not have a spatial index, no spatial index is available for the above operations. However, ArcSDE can also find the results, which is better than Oracle Spatial, which cannot be used for spatial queries without spatial indexes.
2. Comparison of primary filter/st_envintersects
Therefore, we can see from the previous section that the efficiency of spatial indexes can be obtained by comparing the "primary filter" in Oracle Spatial with the st_envintersects in ArcSDE.
In Oracle Spatial, the primary filter is provided through the sdo_filter operation.
The following comparison is provided in the subsequent PDF version, which has not been completed yet.