Determine a spatial index size

Last Published: April 25, 2020


The spatial index for an SDE geodatabase feature class makes queries with spatial filters faster. Determining the optimum spatial index is an iterative process and depends on individual feature geometries that may vary from dataset to dataset. This document demonstrates how to determine a good starting point for a spatial index for a feature class whose feature geometries are relatively uniformly sized. This document uses SDE command line and SQL*Plus. The same process can be used with SQL Server Query Analyzer.


  1. Use the sdelayer command to get the layer ID and current statistics for the layer's spatial index.

    sdelayer -o si_stats -l <layer_name>,shape -i <instance> -u <username> -p <password>

    The Layer ID will be on the third line that reads: Layer 1 Spatial Index Statistics:
  2. Start SQLPlus and log in as the owner of the layer.
  3. Calculate the average length of a feature envelope's edge and multiply by 3.

    select avg((((emaxx - eminx)+(emaxy-eminy))/2)*3) average_edge from<F_table>;

    <F_table> is F<layerID>

Article ID:000004594

  • ArcMap 8 x
  • ArcMap 9 x
  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options