I'm suffering from very slow viewing data of and ArcSDE database from an Arcgis engine application, the SDE database is in localhost so there's no network issues. but i still don't know the reasons neither how to solve this problem.
i'm working on 64 bit machine with 2 CPU's Xeon 3.4 GHz and 2 Gb of RAM.
the database contains 20 feature class, but with the max number of features do not exceed 100 000 in some feature classes, if i wait to view the data i should wait 10 minutes.
i tried to compress and rebuild indexes in the database using the above scipt but there's no improvements at all.
import arcpy , sys , os
arcpy.env.overwriteOutput = True
db_name = sys.argv[1]
db_path = os.path.join(os.path.dirname(__file__), "Connection_"+db_name+".sde")
arcpy.env.workspace = db_path
#disconnect all users from the database.
arcpy.DisconnectUser(db_path, "ALL")
# Get a list of versions to pass into the ReconcileVersions tool.
versionList = arcpy.ListVersions(db_path)
# Execute the ReconcileVersions tool.
arcpy.ReconcileVersions_management(db_path, "ALL_VERSIONS", "sde.DEFAULT", versionList, "LOCK_ACQUIRED", "NO_ABORT", "BY_OBJECT", "FAVOR_TARGET_VERSION", "POST", "DELETE_VERSION", "c:/reconcilelog.txt")
# Run the compress tool.
arcpy.Compress_management(db_path)
#Allow the database to begin accepting connections again
arcpy.AcceptConnections(db_path, True)
dataList = arcpy.ListTables() + arcpy.ListFeatureClasses() + arcpy.ListRasters()
# Next, for feature datasets get all of the featureclasses
# from the list and add them to the master list.
for dataset in arcpy.ListDatasets():
dataList += arcpy.ListFeatureClasses(feature_dataset=dataset)
##print dataList
# pass in the list of datasets owned by the admin to the rebuild indexes and analyze datasets tools
# Note: to use the "SYSTEM" option the user must be an administrator.
arcpy.RebuildIndexes_management(db_path, "SYSTEM", dataList, "ALL")
arcpy.AnalyzeDatasets_management(db_path, "SYSTEM", dataList, "ANALYZE_BASE", "ANALYZE_DELTA", "ANALYZE_ARCHIVE")
i tried to view data from ArcMap, i have founded the same problem.
Using the performance monitor i remarked some bottlenecks in CPU and network sides.
I'm available for explanations of the problem.
Any help please.