<?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: DeleteFeatures_management or truncate? in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394628#M22574</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There's always the option of doing a trace to see what is going on, but if the doc says it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;does a TRUNCATE, and the best possible solution is a TRUNCATE, then it's pretty likely&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that the command is doing a TRUNCATE (and it's likely to apply it to any parallel tables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;manifested by different storage types, too).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using SQL on objects registered with the geodatabase should be a rare event; running a &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL TRUNCATE on a versioned table would be a very bad thing indeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2011 13:36:05 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2011-11-16T13:36:05Z</dc:date>
    <item>
      <title>DeleteFeatures_management or truncate?</title>
      <link>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394627#M22573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can someone help to settle this for me --&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Is arcpy.DeleteFeatures_management performing an SDE truncate?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;The help for the DeleteFeatures_management python tool could be interpreted either way:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;"If you want to delete all features from an ArcSDE feature class, &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;use this tool &lt;/SPAN&gt;&lt;SPAN&gt;against the ArcSDE feature class (not a layer) without a selection in order &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;to perform a database truncate &lt;/SPAN&gt;&lt;SPAN&gt;rather than a row by row deletion of features to delete all the features. The database truncate operation is much faster when deleting all the features in a feature class."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Our sys admin thinks that using SQL truncate may perform a faster delete on SDE features than using DeleteFeatures_management but I'm not so sure that DeleteFeatures_management is not already performing a truncate based on the help manual.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there anyone with experience between the two methods of removing records in SDE that could talk about the difference between the two?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 12:37:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394627#M22573</guid>
      <dc:creator>J_P_</dc:creator>
      <dc:date>2011-11-16T12:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: DeleteFeatures_management or truncate?</title>
      <link>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394628#M22574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There's always the option of doing a trace to see what is going on, but if the doc says it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;does a TRUNCATE, and the best possible solution is a TRUNCATE, then it's pretty likely&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that the command is doing a TRUNCATE (and it's likely to apply it to any parallel tables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;manifested by different storage types, too).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using SQL on objects registered with the geodatabase should be a rare event; running a &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL TRUNCATE on a versioned table would be a very bad thing indeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 13:36:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394628#M22574</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-11-16T13:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: DeleteFeatures_management or truncate?</title>
      <link>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394629#M22575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you expand on why using SQL on objects registered with the geodatabase should be a rare event?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These tables are not versioned so we're good there; but if you have time to give the short answer to why not use SQL truncate I would appreciate it too.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 13:56:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394629#M22575</guid>
      <dc:creator>J_P_</dc:creator>
      <dc:date>2011-11-16T13:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: DeleteFeatures_management or truncate?</title>
      <link>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394630#M22576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I already included one reason -- some storage types are implemented as multiple tables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The closer you come to simple feature classes (aka ArcSDE layer, aka database table),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the more flexibility you have in using SQL for nominal management.&amp;nbsp; Don't get me wrong --&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You *can* always use SQL (I do, albeit rarely), but if you do it wrong, you'll be validating&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;your backup integrity more than most sites.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 14:11:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394630#M22576</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-11-16T14:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: DeleteFeatures_management or truncate?</title>
      <link>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394631#M22577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great, thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 14:46:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deletefeatures-management-or-truncate/m-p/394631#M22577</guid>
      <dc:creator>J_P_</dc:creator>
      <dc:date>2011-11-16T14:46:48Z</dc:date>
    </item>
  </channel>
</rss>

