How to improve performance using spatial indexes. We would like to show you how to set them up and put them to best use.
How to update spatial indexes
ArcGIS uses spatial indexes to improve the performance of the spatial query on feature classes. To identify a feature, select features by pointing or drawing a frame and perform moves and zooms.
When a feature class is created in a geodatabase a spatial index is automatically created. The spatial index is then used to optimize querying and editing of data.
ArcGIS automatically recreates the spatial index after specific operations in geodatabases, so it is rarely necessary to recreate an index manually yourself. However, it is still recommended to recreate the spatial index manually after adding a large number of features that are different in size from the features already present in the feature class.
You can update the spatial index to the following types of feature classes in the ArcGIS Desktop Feature Class Properties dialog box by doing the following :
- Delete and re-create the spatial index on a feature class in a file geodatabase.
- Rebuild the spatial index on an Esri ST_Geometry feature class in a database or geodatabase in Oracle.
- Recalculate the spatial index and feature class extent on a Geometry feature class in a database or geodatabase in Microsoft SQL Server.
Spatial indexes on feature classes in personal geodatabases are automatically managed and can therefore not be updated or re-created.
To rebuild or re-create a spatial index on a feature class from the Feature Class Properties dialog box, do the following:
- Open ArcCatalog and navigate to the chosen feature class
- Open the properties of the feature class
- Click on the Index tab
- How you modify the spatial index for a feature class depends on what spatial data type the feature class contains.
- For feature classes using Geometry storage in SQL Server, click Recalculate to let ArcGIS set the grid size.
- For feature classes using ST_Geometry in Oracle, click Rebuild.
- For feature classes in a file geodatabase, click Delete to drop the spatial index and click Create to create a new
Reference article: https://desktop.arcgis.com
Creating spatial indexes in a MS SQL Server Enterprise Geodatabase
Geocom provides you with an ArcGIS toolbox for the creation and administration of enterprise geodatabases. You can download the toolbox from GitHub.
Part of this toobox is a script for creating spatial indexes. The script rebuilds the spatial indexes for all feature classes of a database. Proceed as follows:
- Open ArcCatalog and navigate to Geocom Database Managemt Tools
- Open Set spatial indexes geometry (MSSQL).
- In field Database owner connection, Drag & Drop a Data-Owner sde connection file.
- Enter the System Administrator password of the SQL Server instance into the field SA password (optional).
- Drag & Drop a Feature Class into the field FeatureClass for Extent (optional).
All Feature Classes now receive this bounding box. Here it is important to note that the extension of all feature classes must approximately be the same. In the case of large differences (e.g. whole Switzerland vs. small municipalities), different extensions must be used. To do so, use the path via the properties in the ArcCatalog.
- The coordinate values are filled automatically:
- Start the script by clicking OK