<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Very slow Append - how to clear out GDB_ITEMS Doumentation xml field? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/very-slow-append-how-to-clear-out-gdb-items/m-p/1331160#M68722</link>
    <description>&lt;P&gt;That did the trick - exactly what I was looking for. The append that previously ran almost three minutes now takes about 1 second.&amp;nbsp; The script ran as-is (except for editing in my workspace path).&amp;nbsp; 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&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        try:
            tgt_item_md.save()
        except Exception as ex:
            print (str(ex))&lt;/LI-CODE&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
    <pubDate>Thu, 21 Sep 2023 16:53:00 GMT</pubDate>
    <dc:creator>DonMorrison1</dc:creator>
    <dc:date>2023-09-21T16:53:00Z</dc:date>
    <item>
      <title>Very slow Append - how to clear out GDB_ITEMS Doumentation xml field?</title>
      <link>https://community.esri.com/t5/python-questions/very-slow-append-how-to-clear-out-gdb-items/m-p/1329577#M68661</link>
      <description>&lt;P&gt;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.&amp;nbsp; I noticed that is has been taking almost 3 minutes to do the append which seems unreasonable for 4 or 5 records.&amp;nbsp; 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.&amp;nbsp; I've tried suggestions from other posts to no avail:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Rebuild the spatial index&lt;/LI&gt;&lt;LI&gt;arcpy.SetLogHistory(False)&lt;/LI&gt;&lt;LI&gt;arcpy.SetLogMetadata(False)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;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).&amp;nbsp; 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?&lt;/P&gt;&lt;P&gt;I'm using SQL Server and ArcGIS Pro 3.1.1 (Windows)&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 13:38:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/very-slow-append-how-to-clear-out-gdb-items/m-p/1329577#M68661</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2023-09-18T13:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Very slow Append - how to clear out GDB_ITEMS Doumentation xml field?</title>
      <link>https://community.esri.com/t5/python-questions/very-slow-append-how-to-clear-out-gdb-items/m-p/1329586#M68663</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/192850"&gt;@DonMorrison1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Try deleting the GP History from the geodatabase to see if that improves performance:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en-us/knowledge-base/how-to-delete-geoprocessing-history-from-a-geodatabase-000027149" target="_blank"&gt;https://support.esri.com/en-us/knowledge-base/how-to-delete-geoprocessing-history-from-a-geodatabase-000027149&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I did find one issue with the script when running with ArcGIS Pro 3.1.&amp;nbsp; I had to remove&amp;nbsp;&lt;STRONG&gt;db,&lt;/STRONG&gt; from the below line:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JakeSkinner_0-1695045161487.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80901iC3AA994D7F3BDA6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JakeSkinner_0-1695045161487.png" alt="JakeSkinner_0-1695045161487.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 13:53:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/very-slow-append-how-to-clear-out-gdb-items/m-p/1329586#M68663</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2023-09-18T13:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Very slow Append - how to clear out GDB_ITEMS Doumentation xml field?</title>
      <link>https://community.esri.com/t5/python-questions/very-slow-append-how-to-clear-out-gdb-items/m-p/1331160#M68722</link>
      <description>&lt;P&gt;That did the trick - exactly what I was looking for. The append that previously ran almost three minutes now takes about 1 second.&amp;nbsp; The script ran as-is (except for editing in my workspace path).&amp;nbsp; 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&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        try:
            tgt_item_md.save()
        except Exception as ex:
            print (str(ex))&lt;/LI-CODE&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 16:53:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/very-slow-append-how-to-clear-out-gdb-items/m-p/1331160#M68722</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2023-09-21T16:53:00Z</dc:date>
    </item>
  </channel>
</rss>

