<?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: Delete features and Append issue in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1095962#M62251</link>
    <description>&lt;P&gt;How are you deleting the features?&amp;nbsp; Does everyone of them get deleted?&amp;nbsp; If so, I suggest &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/truncatetable.htm" target="_self"&gt;using truncate&lt;/A&gt;.&amp;nbsp; It's always done a good job for me.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Sep 2021 15:16:05 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2021-09-07T15:16:05Z</dc:date>
    <item>
      <title>Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1095949#M62250</link>
      <description>&lt;P&gt;I have a layer that is created by a python script that is used in portal and map service. It is in a SDE database and the script deletes all the features and then appends&amp;nbsp; the new features that are created by the script. The issues that I am having is that the more and more I run the script it seems as the feature class/layer gets slower. For example if I try to preview the feature class in ArcCatalog it takes a long time to display the feature class, longer than it should. The same goes for the map service,&amp;nbsp; this feature class in a Map Service. The a query from this map service takes a long time. What is the issue? Is there a better way to delete features and append features?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 15:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1095949#M62250</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2021-09-07T15:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1095962#M62251</link>
      <description>&lt;P&gt;How are you deleting the features?&amp;nbsp; Does everyone of them get deleted?&amp;nbsp; If so, I suggest &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/truncatetable.htm" target="_self"&gt;using truncate&lt;/A&gt;.&amp;nbsp; It's always done a good job for me.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 15:16:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1095962#M62251</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-09-07T15:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1095969#M62252</link>
      <description>&lt;P&gt;I am using arcpy.DeleteFeatures_management. It does appear to delete them all when I use arcpy.DeleteFeatures_management.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 15:27:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1095969#M62252</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2021-09-07T15:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1095976#M62254</link>
      <description>&lt;P&gt;If your workflow does indeed call for all features to be deleted, I suggest using truncate instead.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 15:45:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1095976#M62254</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-09-07T15:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096007#M62255</link>
      <description>&lt;P&gt;Are you compressing the database at all in any of your database maintenance routines?&amp;nbsp; There are some caveats to this so it may/ may not be applicable to your environment/ database so check out the Usage.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/compress.htm" target="_self"&gt;compress&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 16:40:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096007#M62255</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-09-07T16:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096011#M62256</link>
      <description>&lt;P&gt;Another argument for branch versioning: no compressing needed!!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 16:44:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096011#M62256</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-09-07T16:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096049#M62258</link>
      <description>&lt;P&gt;The feature class is Versioned and according to the help doc it can't be versioned.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 17:55:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096049#M62258</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2021-09-07T17:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096054#M62259</link>
      <description>Check that again- its not applicable to databases that do not use versioning meaning if yours is versioned, it’s applicable. Kind of a double negative there in the docs.&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Sep 2021 18:04:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096054#M62259</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-09-07T18:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096064#M62260</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3265"&gt;@TonyAlmeida&lt;/a&gt;&amp;nbsp;I second&amp;nbsp;@Anonymous User&amp;nbsp;for compressing the geodatabase.&amp;nbsp; You mentioned your feature class is versioned, so each time the delete features/append occurs you are adding records to the delta tables (A &amp;amp; D tables).&amp;nbsp; If there are 10,000 features, you are adding 10,000 new rows to the A table, and 10,000 new rows to the D table.&amp;nbsp; ArcGIS queries these tables to display/query the feature class.&amp;nbsp; The larger these tables are, the longer it will take to query/display.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to compress the geodatabase, you will want to make sure there are no locks on the feature classes.&amp;nbsp; This means, you'll need to stop all ArcGIS Server services referencing data from your Enterprise Geodatabase.&amp;nbsp; Here is a tool that may be helpful for you:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/data-management-documents/compress-geodatabase-tool/ta-p/908944" target="_blank"&gt;https://community.esri.com/t5/data-management-documents/compress-geodatabase-tool/ta-p/908944&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 18:39:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096064#M62260</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-09-07T18:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096431#M62273</link>
      <description>&lt;P&gt;The arcpy.TruncateTable_management gave me ERROR 001259: Operation not supported on a versioned table.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 15:30:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096431#M62273</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2021-09-08T15:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Delete features and Append issue</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096441#M62274</link>
      <description>&lt;P&gt;We do run a compression every night but I will have to look deeper into the database to see if there is an issues with the compression.&amp;nbsp; I figured that if I did a delete features on the entire feature class it would delete everything, which is&amp;nbsp; what I want. I have ran the delete features on the feature class and have verified in ArcCatolog that all the features were deleted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if it's versioned and I run the delete features, then append it doesn't delete the old records?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 15:35:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-append-issue/m-p/1096441#M62274</guid>
      <dc:creator>TonyAlmeida</dc:creator>
      <dc:date>2021-09-08T15:35:47Z</dc:date>
    </item>
  </channel>
</rss>

