ArcPy Cursors That Scale: Patterns for Real-World Geodatabases

1 view
Skip to first unread message

Eric Pimpler

unread,
May 12, 2026, 10:52:42 AMMay 12
to Undisclosed recipients

In the last article we built a script that inventories everything inside a geodatabase: feature classes, tables, fields, domains, subtypes, and relationship classes. Knowing what’s in there is the first step. The second is being able to read and write all that data efficiently, and that’s where cursors come in.

Most ArcPy cursor examples online stop at the toy stage — open a SearchCursor, print every row. That’s fine until you’re updating two million parcels, your script has been running for six hours, and you’re starting to wonder whether you should kill it or wait. Or until you write a perfectly reasonable-looking update loop, run it on a versioned enterprise feature class, and silently corrupt three weeks of edits.

Cursors are the workhorse of ArcPy. They’re also where small choices make order-of-magnitude differences in performance and correctness. The patterns that work on a 500-row sample geodatabase do not necessarily work on the parcel layer for a county of 400,000 properties. This article covers the cursor patterns that hold up on real data — what to do, what to avoid, and the worked example that ties it all together.

Read the entire article.



--
Eric Pimpler
President/Owner
Geospatial Training Services
215 W Bandera #114-104
Boerne, TX 78006
Twitter - @gistraining
Instagram - @eric_pimpler


Reply all
Reply to author
Forward
0 new messages