I have the following code that will take around 12 Hours in insert 7,000 rows. I have no idea why it is so slow.
the routeRunRows is just a dictionary from an oracle database (cursor.fetchAll() using the oracledb library). When I run the loop without the arcpy.da.InsertCursor it take seconds (which makes sense). Any help would be appreciated.
for row in routeRunRows:
if (x%1000) == 0:
message = str(x) + ' Processed...'; show_py_message()
x += 1
with arcpy.da.InsertCursor("d:/projects/SolidWaste/SolidWaste.sde/SolidWaste.DBO.cayServiceOrders", ["RouteNumber","RouteDescription","StartDate","RouteOrder","StreetAddress","ServiceItemType","SerialNumber","X","Y","ItemUse","RouteNote","AccountNumber","AccountStatus","ServiceItemID","SHAPE@XY"]) as insertSO:
routeNote = " "
if row[10] is not None:
routeNote = row[10][:120]
insertSO.insertRow((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9],routeNote,row[11],row[12],row[13],(row[7],row[8])))