AnsweredAssumed Answered

Is the Data Access module faster at counting features than MakeTableView + GetCount

Question asked by markieta on Jul 13, 2012
Latest reply on Jul 25, 2012 by ldmitruk
Given the functions in my python application, I would rather use the new data access module and Search Cursors to access my data and iterate through an object.
Planning for the future, which method would produce quicker results when scaled upwards (more features)?

     with arcpy.da.SearchCursor("myFeature", ["OBJECTID"]) as cursor:     rows = sorted({row[0] for row in cursor})  count = 0 for row in rows:     count += 1


or

     arcpy.MakeTableView_management("myFeature", "myTableView") count = int(arcpy.GetCount_management("myTableView").getOutput(0))


Cheers

Outcomes