1

The issue I am having involves two versioned tables. A function deletes 48 rows from Table A and and 48 rows from Table B using deleteSearchedRows. However, the delete from Table A takes roughly 4 seconds while the delete from table B takes roughly 67 seconds.

The query filter for both deletes is a single number field that has been indexed in the table, objectID indexed as well. Table A has roughly 45,000 records and Table B 60,000 records. Both tables also have cascade deletes set to No, so that the only data being deleted would be that table's.

Table structures are very similar. Table A has OID field + 3 Long integer fields, 2 short integer fields and a date field. Table B has OID, 3 long integer, 1 Text, and a date field. Running the delete query from SQL Plus is very quick, so it's probably not a drive efficiency issue.

I broke apart the select and delete sections to see if the search was slow. I used the Search(queryFilter, false) and it returns instantly, but looping and deleting every IRow.Delete takes slightly over a second per row for Table B.

I am at a loss on what the difference could be to cause such a severe performance difference in two tables.
Any ideas/debug methods are appreciated.

Using ArcGIS 10.0 with an Oracle database

2

Geodatabase type matters for the type of delete you should use. If you're using an ArcSDE geodatabase, the recommended method is to use IRow.Delete().

The ITable.deleteSearchedRows() is recommended for local (file and personal geodatabases):

See the ESRI link (under the 'Deleting Features' heading) for detail and examples:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000002rs000000

  • Thanks so much for the information! We'll try changing some of the logic in accordance with the documentation. Still not sure why that command would have such a problem with one table but not a similar table. Would like to test before awarding answer, though. – Hilfy May 9 '14 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.