Performance on Azure SQL database in Pro 2.6 vs. ArcMap 10.8.1

465
0
07-31-2020 01:48 AM
Stefan_Offermann
New Contributor III

I have written a small Python Toolbox which creates a feature dataset, a polygon feature class and adds 24 fields to the feaure class. Running the script on a File Geodatabase is very fast, but when I change the workspace to an Azure SQL database, performance degrades noticable. I run the scripts on an Azure virtual machine.

Running with ArcMap 10.8.1 takes 1 minute 36 seconds.

Running the same script in Pro 2.6 takes 7 minutes 57 seconds.

Any hint on why this is slower in Pro or how to improve speed?

Azure SQL Database is SQL Server 2019, the client is using SQL Driver 17 from Microsoft.

geodatabase = r"C:\Users\s.offermann\Documents\ArcGIS\Projects\MyProject\azure.sde"
arcpy.env.workspace = geodatabase
featureDataset = "myFeatureDataset"
featureDatasetPath = os.path.join(geodatabase, featureDataset)
name = "myFeatureClass"
featureClass = os.path.join(featureDataset, name)
		
arcpy.CreateFeatureDataset_management(geodatabase, featureDataset, 25832)
arcpy.CreateFeatureclass_management(featureDatasetPath, name, "POLYGON", '', 'DISABLED', 'ENABLED')

arcpy.AddField_management(featureClass, 'CompanyID', 'TEXT')
# ... 23 more fields ...
0 Kudos
0 Replies