Checking to see if a Field Index Exists Using Python (geoprocessing 9.3).
NOTE: I have a post here that shows how to check if a field exists using arcpy in ArcGIS 10.0.
In developing a python script to reload a geodatabase, I wanted to create any necessary indexes.
No problem creating the index, for example:
gp.AddIndex_management(tablename, field, IndexName, "NON_UNIQUE", "NON_ASCENDING") But before creating the index, I wanted to verify that it did not exist. I tried the ever-popular, exists but could not get it to work–either it does not detect indexes or I just never got the fully-qualified name for the index right (ArcSDE using a postgres datastore).