Remove Attribute Index (Data Management)

Summary

Deletes an attribute index from an existing table, feature class, shapefile, or attributed relationship class.

Attribute indexes are used by ArcGIS to quickly locate records that match an attribute query.

Usage

  • This tool accepts shapefiles, geodatabase feature classes, and attribute relationship classes as input.

  • If the Index Name parameter is empty when the Input Table parameter value has been provided, there are no attribute indexes in the dataset.

  • Once an index has been added, it can be deleted and re-added at any point in the lifetime of the feature class or table.

  • For enterprise geodatabase data that is not registered as versioned, you can delete both unique and nonunique indexes on GlobalID fields. However, if you remove the index on a GlobalID field, it is recommended that you re-add an index on the GlobalID field to improve performance for attribute queries on the feature class or table.

Parameters

LabelExplanationData Type
Input Table

The input containing the index or indexes that will be deleted. The input can be a table, a feature class, or an attributed relationship class.

Table View; Raster Layer; Mosaic Layer
Index Name or Indexed Item

The name of the index or indexes that will be deleted.

String

Derived Output

LabelExplanationData Type
Updated Input Table

The updated input table.

Table View; Raster Layer; Mosaic Layer

arcpy.management.RemoveIndex(in_table, index_name)
NameExplanationData Type
in_table

The input containing the index or indexes that will be deleted. The input can be a table, a feature class, or an attributed relationship class.

Table View; Raster Layer; Mosaic Layer
index_name
[index_name,...]

The name of the index or indexes that will be deleted.

String

Derived Output

NameExplanationData Type
out_table

The updated input table.

Table View; Raster Layer; Mosaic Layer

Code sample

RemoveIndex example 1 (Python window)

The following code demonstrates how to use the RemoveIndex function in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data/input/indices.gdb"
arcpy.management.RemoveIndex("lakes", ["IndexA", "IndexB"])
RemoveIndex example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the RemoveIndex function.

import arcpy
 
# Set a default workspace
arcpy.env.workspace = "c:/data"
 
# Remove two indexes from the feature class
arcpy.management.RemoveIndex("/county.gdb/lots", ["indexa", "indexb"])

Environments

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics