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 ...