I have a script that runs every 10 minutes and appends on the average handful of records to an SDE point feature class each time. I noticed that is has been taking almost 3 minutes to do the append which seems unreasonable for 4 or 5 records. I converted the Append to InsertCursor and it how takes about 1 second. But the Append is much simpler and I'd like to get to the bottom of the problem. I've tried suggestions from other posts to no avail:
I checked the "Documentation" field in the GDB_Items table and see the the xml contents is 82Meg so maybe that really is the problem - where it has to get read in and updated on every Append (even when I thought I turned of metadata and history logging). Does anybody know the best way to clear out the "Documentation" field (can I just set it to an empty string?) and what is the downside of doing this?
I'm using SQL Server and ArcGIS Pro 3.1.1 (Windows)
Solved! Go to Solution.
Hi @DonMorrison1 ,
Try deleting the GP History from the geodatabase to see if that improves performance:
I did find one issue with the script when running with ArcGIS Pro 3.1. I had to remove db, from the below line:
Hi @DonMorrison1 ,
Try deleting the GP History from the geodatabase to see if that improves performance:
I did find one issue with the script when running with ArcGIS Pro 3.1. I had to remove db, from the below line:
That did the trick - exactly what I was looking for. The append that previously ran almost three minutes now takes about 1 second. The script ran as-is (except for editing in my workspace path). It did take an exception for one feature class when removing the metadata but that feature class was of no importance so I just put a handler around it to keep the script running
try:
tgt_item_md.save()
except Exception as ex:
print (str(ex))
Thanks @JakeSkinner !