What is the most efficient (fastest) way to calculate records in a layer in ArcGIS?
Is there anything faster than the Cursor in ArcGIS?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
If you are using ArcGIS 10.1 you can use the data access module which speeds up performance and, in my opinion, has a simpler syntax than the traditional cursors. However this module is only available for 10.1 so only use it if you are sure you will not need to run your code in older environments.
I would think that using
CalculateField_management would be faster than using a cursor as well, as you are not iterating through each record like you are with a cursor. If you need to, you can use a Python expression in the call. Available at 10.0 (and 9.x for that matter).
I would recommend checking out the following very informative and related links:
In the first post, @OptimizePrime recommended utilizing "in_memory" workspace while performing field calculations.
I found way more faster (dealing with 100 000+ records) to use pyodbc and update all columns with SQL querry. Unfortunatelly you cannot use pyodbc (free) in connection with ArcGIS 9.3.