A quick tour of setting a spatial index

The spatial index is used to quickly locate features when you display, edit, or query data. Therefore, an appropriate spatial index is important, especially when you're working with large amounts of data.

Spatial indexes work differently depending on the data source. File and ArcSDE geodatabases in DB2, ArcSDE geodatabases in Oracle and SQL Server that use binary geometry storage, and ArcSDE geodatabases in Oracle that use ST_Geometry storage use a system of up to three grids as the spatial index. Personal geodatabases use a single grid. A grid is defined by a size, referred to as the grid size. This is the size of each cell in the grid, specified in the units of the feature class's coordinate system. Oracle Spatial, Informix, and PostgreSQL do not use grid sizes—they use an R-tree index. Similarly, with SQL Server spatial types, the spatial index does not use grids.

How ArcGIS maintains indexes in file and ArcSDE geodatabases

ArcGIS automatically rebuilds the spatial index at the end of certain operations in file and ArcSDE geodatabases to ensure that the index is optimal. The following explains how ArcGIS manages the spatial index:

When to update the index in file and ArcSDE geodatabases

Because ArcGIS maintains the spatial index in file and ArcSDE geodatabases, you seldom need to manually set or recalculate the index. Changing or recalculating the index is required only in the following rare situations:

This topic has so far mostly discussed using the default grid sizes calculated by ArcGIS for spatial grid indexes. In most circumstances, the default grid size is appropriate for fast spatial queries. However, depending on the characteristics of your data and how you access it, it may not be the optimal size. Setting your own grid sizes may result in better performance. Finding better grid sizes involves experimenting with different sizes and running performance tests each time to observe the effects. However, you may not be able to improve performance—the existing grid size may already be optimal.

If you manually entered grid sizes and want to revert to a size provided by ArcGIS, you can recalculate a new grid size at any time. Click the Recalculate button on the Index tab of the Feature Class Properties dialog box. ArcGIS can also calculate an appropriate grid size with the Calculate Default Spatial Grid Index geoprocessing tool, although this provides the same size that you get with the Recalculate button.

If you are using Microsoft SQL Server spatial type indexes, grids are not used, and therefore, there is no need to recalculate grids.

Spatial indexes in personal geodatabases

Whenever you create a feature class in a personal geodatabase, whether with the New Feature Class wizard, a geoprocessing tool, or any other method, the spatial index grid size will be calculated for you by the software and it cannot be modified. The calculated grid size is based on the horizon of the feature class coordinate system and will always be optimal.


11/18/2013