Database TuningWater/Wastewater DB Design Conference February 2005 How the Grid Tile Spatial Index Works 1.
{"Image DocumentName": "How the Grid Tile Spatial Index Works", "Image ImageDescription": "Goal: Avoid reading shapes for entire layer (full table scan) Four stages of elimination. The goal of the spatial index is to reduce the number of shape on shape comparisons performed by ArcSDE and speed up data retrieval. An ArcSDE client applies a spatial filter to a request, and the server must process the rows in the feature class to determine which shapes meet the spatial constraint. With a three-tier connection, the ArcSDE server (gsrvr) performs stages 3 and 4. With a two-tier connection, the gsrvr functionality is built into the client, therefore the client performs stages 3 and 4. GRID TILE SEARCH. The client or the ArcSDE server (gsrvr) receives the spatial filter and determines the grid tile(s) that the the filter crosses and the envelope (lower left/upper right corner) of the filter. These values are passed to the RDBMS in the SELECT statement. First stage: The RDBMS receives the SQL statement from ArcSDE, which contains the grid tile and envelope coordinates. The WHERE clause defines the grid tiles to select in the spatial index. Once the grid tiles are located in the spatial index table the envelope search commences on the envelopes associated with the selected grids. Second stage: Using the filter envelope and the shape envelopes in the spatial index table, the RDBMS reduces the initial selected set. The filter envelope and the shape envelopes are compared by the RDBMS for overlap. If there is overlap the shape is selected for the shape comparison stage. Third stage: The shape of the spatial filter is compared to the features\u2019 envelopes from Stage 2 by the ArcSDE server or the client. If the features\u2019 envelopes do not overlap the shape of the filter then these records are not used in the final stage. Fourth stage: The shape on shape comparison is a binary comparison of the filter shape and feature shape. The actual binary shapes are compared to the filter\u2019s shape for overlap by ArcSDE or the client. The resulting records are returned to the client. FILTER (SELECTION SHAPE) LAYER. 1. tile tile. RDBMS. envelope envelope. 2. shape envelope. ArcSDE server or client. 3. shape shape. 4. Database Tuning Water/Wastewater DB Design Conference February 2005.", "Image XResolution": "37", "Image YResolution": "37", "Image ResolutionUnit": "Pixels/Centimeter", "Image Software": "SlidePlayer", "Image YCbCrPositioning": "Centered"}