Functionality limited in Basic.
For all other geodatabases and spatial types, you seldom need to manage the spatial index. However, if you experience a decrease in spatial query performance after adding or deleting a large number of features, you may see improved spatial query performance if you rebuild (Oracle) or re-create the spatial index on the affected feature class.
You may need to modify the spatial index of a feature class in the following situations:
- If you experience poor performance when using the feature class, rebuild or recalculate the spatial index.
- If you added or deleted a large number of features in SQL Server and the feature class spatial data type is Geometry, validate the spatial index to determine if you need to recalculate it or if you need to update the feature class extent instead.
Tip:
You can see what type of geometry storage is used for your feature class by looking at the Storage property on the Source tab of the Feature Class Properties dialog box.
- You want to append or copy a large number of features to an existing feature class. In this case, you can delete the spatial index before you add the data. This is not required, but deleting the spatial index can improve performance for the data loading operation. Create a spatial index when you finish adding the features.
Note:
Rebuilding, recalculating, or creating a spatial index for a feature class in an enterprise geodatabase is a server-intensive operation. It should not be done on large feature classes when many users are logged in to the server.
Also note that you must have ArcGIS Desktop Advanced or Desktop Standard to modify the spatial index of a feature class in an enterprise geodatabase.
Rebuild or recalculate a spatial index
To rebuild or recalculate a spatial index on a feature class in a file geodatabase, mobile geodatabase, or an enterprise geodatabase in Oracle, Db2, PostgreSQL, or SQL Server (using the Geography spatial type), follow these steps:
- In the Catalog pane, connect to the geodatabase that contains the feature class with the spatial index you want to modify.
For enterprise geodatabases, connect as the feature class owner.
- Right-click the feature class and click Properties.
- Click the Indexes tab.
- Expand the Spatial Index section.
- Click Recalculate (or Rebuild if your feature class is in Oracle).The recalculated index reflects the current data.
- Click OK to close the Feature Class Properties dialog box.
Validate a spatial index in SQL Server (Geometry)
To determine if you should recalculate the spatial index or extent on a poorly performing feature class that uses the Geometry spatial type in SQL Server, validate the spatial index.
- In the Catalog pane, connect to the geodatabase that contains the feature class with the spatial index you want to modify.
For enterprise geodatabases, connect as the feature class owner.
- Right-click the feature class and click Properties.
- Click the Indexes tab.
- Expand the Spatial Index section.
- Click Validate to determine if it is necessary to recalculate the spatial index. Validation returns one of the following messages:
- The spatial index bounding box matches the feature class extent.—If you receive this message, you do not need to recalculate the spatial index. Click OK to close the Feature Class Properties dialog box.
- The spatial index bounding box and feature class extent do not match. Recalculate the spatial index.—If you receive this message, click Recalculate.
- The spatial index bounding box and feature class extent do not match. Run the Recalculate Feature Class Extent geoprocessing tool.—If you receive this message, click OK to close the Feature Class Properties dialog box, and run the Recalculate Feature Class Extent tool on this feature class.
Delete a spatial index
To add a large number of features to an existing feature class in a single operation, delete the spatial index to decrease the amount of time it takes to add the new features. Once the new features are added, create a spatial index on the feature class.
- In the Catalog pane, connect to the geodatabase that contains the feature class with the spatial index you want to delete.
For enterprise geodatabases, connect as the feature class owner.
- Right-click the feature class and click Properties.
- Click the Indexes tab.
- Expand the Spatial Index section.
- Click Delete and click OK to close the Feature Class Properties dialog box.
- Append or copy rows into the feature class.
- Open the Feature Class Properties dialog box for the feature class again, expand the Spatial Index section, and click Create.
A new spatial index is added to the feature class, and it includes the newly added features.
- Click OK to close the Feature Class Properties dialog box.