Remove Attribute Index (Data Management)
This tool deletes an attribute index from an existing table, feature class, shapefile, coverage, or attributed relationship class.
Attribute indexes are used by ArcGIS to quickly locate records that match an attribute query.
This tool accepts as input coverage feature classes, shapefiles, file or personal and SDE geodatabase feature classes, and attribute relationship classes.
If the Index Name parameter is empty, there are no attribute indexes in the dataset.
Only feature classes from a file or personal geodatabase or SDE database support more than one attribute index. Therefore, the index list can contain only one index to delete unless the input table is from a file or personal geodatabase or SDE database.
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.
The Index Name or Indexed Item parameter's Add Value button is used only in ModelBuilder. In ModelBuilder, where the preceding tool has not been run, or its derived data does not exist, the Index Name or Indexed Item parameter may not be populated with values. The Add Value button allows you to add expected value(s) so you can complete the Remove Attribute Index dialog box and continue to build your model.
The table containing the index or indexes to be deleted. Table can refer to an actual table, a feature class attribute table, or an attributed relationship class.
|Mosaic Layer; Raster Catalog Layer; Raster Layer; Table View|
The name of the index or indexes to be deleted.
The following code demonstrates how to use RemoveIndex function in a Python interactive window.
import arcpy arcpy.env.workspace = "C:/data/input/indices.gdb" arcpy.RemoveIndex_management("lakes", ["IndexA", "IndexB"])
import arcpy # Set a default workspace arcpy.env.workspace = "c:/data" try: # Remove 2 indexes for the Feature Class below. arcpy.RemoveIndex_management ("/county.gdb/lots", "indexa;indexb") except Exception, e: # If an error occurred, print line number and error message import traceback, sys tb = sys.exc_info() print "Line %i" % tb.tb_lineno print e.message