DeleteFeatures deleting records 1 at a time SDE 9.3.1 SQL 2008 (new bug?)

662
0
10-27-2010 10:37 AM
RandyKreuziger
Occasional Contributor III
When I upgraded to SDE 9.2 on SQL 2000 the DeleteFeatures_management geoprocessing tool would immediately delete all records at one time in a feature class.  So total time about 2 seconds.  Now I find that on SDE 9.3.1 it's gone back to the pre 9.2 behavior of deleting 1 record at a time.  What happened.  I changed my python script from pointing to a 9.2 SDE database to my new 9.3.1 and it has gone from 2 seconds to several hours for the deletefeatures command on a 1 million plus row feature class.


                    if row.feattype == "table":
                        gp.Deleterows_management(targetLayer)                         
                    else:
                        gp.DeleteFeatures_management(targetLayer)
0 Kudos
0 Replies