With the introduction of the Data Access module in arcpy (30x faster search cursors), I want to know if counting features matching sql criteria is faster than the traditional MakeTableView + GetCount methodology?
ArcGIS Desktop – Fastest Way to Count Features in a Feature Class
arcgis-10.1arcgis-desktoparcpyperformance
Related Question
- ArcPy – Why Is Data Access Cursor Performance Enhanced in Recent Versions?
- [GIS] Using SQL statement with ArcPy
- [GIS] Selecting features in an ArcGIS attribute table based on values of other features in the same table using SQL
- ArcPy/Python – Printing Number of Selected Features Based on Different Selection Criteria in ArcPy
Best Answer
I am using an example with 1 million randomly generated points inside of a filegeodatabase. Attached here.
Here is some code to get us started:
And some initial results:
Imagine larger, more complex datasets. The SearchCursor will indefinitely crawl.
I am not at all dissatisfied with the results, however, the DataAccess module is being used extensively in our GIS development circle. I am looking to rebuild some of our function definitions with this module as it is more flexible than a MakeTableView + GetCount methodology.