Recent results show that adding indices to the DesignID field of all feature and object classes that participate in a design can improve save/open design performance by as much as 60%. On a versioned geodatabase, you will also need to update the Adds tables. You can run the following Python script to programmatically create the necessary indices:
arcpy.env.workspace = r"c:\location_of_your_database\database_name.gdb"
For a versioned database, point to the .sde file in your C:\Users\[username]\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog
directory. Be sure to have that connection use saved credentials.
See http://gis.stackexchange.com/questions/16859/define-workspace-for-sde-connection-in-python for an example.
for dataset in arcpy.ListDatasets():
for fc in arcpy.ListFeatureClasses(feature_dataset=dataset):
arcpy.AddIndex_management(dataset + "/" + fc, "DesignID", "DesignID")
print("Skipping feature class " + fc + " in dataset " + dataset)
for table in arcpy.ListTables():
arcpy.AddIndex_management(table, "DesignID", "DesignID")
print("Skipping table " + table)
Running the Script in ArcCatalog
- Change the value of arcpy.env.workspace to your SDE connection or personal geodatabase.
- Start ArcCatalog.
- In ArcCatalog, select Geoprocessing > Results to open the Results pane. This pane will show the actions the script makes.
- Select Geoprocessing > Python to open the Python window.
- Copy and paste the preceding code into the Python window.
- Hit Enter. The script will add the indices to the necessary tables.