<div dir="ltr"><p class="gmail-font-claude-response-body gmail-break-words gmail-whitespace-normal gmail-leading-[1.7]" style="box-sizing:border-box;margin:0px;padding:0px 0px 1em;border:0px;outline:0px;font-size:16px;vertical-align:baseline;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;color:rgb(0,0,0);font-family:Lato,Helvetica,Arial,Lucida,sans-serif"><a href="https://geospatialtraining.com/know-your-geodatabase-a-reusable-arcpy-inspection-script/" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background:transparent;color:rgb(28,165,234);text-decoration-line:none">In the last article</a> 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.</p><p class="gmail-font-claude-response-body gmail-break-words gmail-whitespace-normal gmail-leading-[1.7]" style="box-sizing:border-box;margin:0px;padding:0px 0px 1em;border:0px;outline:0px;font-size:16px;vertical-align:baseline;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;color:rgb(0,0,0);font-family:Lato,Helvetica,Arial,Lucida,sans-serif">Most ArcPy cursor examples online stop at the toy stage — open a <code class="gmail-bg-text-200/5 gmail-border gmail-border-0.5 gmail-border-border-300 gmail-text-danger-000 gmail-whitespace-pre-wrap gmail-rounded-[0.4rem] gmail-px-1 gmail-py-px gmail-text-[0.9rem]" style="box-sizing:border-box;margin:0px 0px 10px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background:transparent;font-family:"Courier New",monospace">SearchCursor</code>, 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.</p><p class="gmail-font-claude-response-body gmail-break-words gmail-whitespace-normal gmail-leading-[1.7]" style="box-sizing:border-box;margin:0px;padding:0px 0px 1em;border:0px;outline:0px;font-size:16px;vertical-align:baseline;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;color:rgb(0,0,0);font-family:Lato,Helvetica,Arial,Lucida,sans-serif">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.</p><p class="gmail-font-claude-response-body gmail-break-words gmail-whitespace-normal gmail-leading-[1.7]" style="box-sizing:border-box;margin:0px;padding:0px 0px 1em;border:0px;outline:0px;font-size:16px;vertical-align:baseline;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;color:rgb(0,0,0);font-family:Lato,Helvetica,Arial,Lucida,sans-serif"><a href="https://geospatialtraining.com/arcpy-cursors-that-scale-patterns-for-real-world-geodatabases/">Read the entire article.</a></p><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Eric Pimpler<div>President/Owner</div><div>Geospatial Training Services</div><div>215 W Bandera #114-104</div><div>Boerne, TX 78006</div><div><a href="http://geospatialtraining.com" target="_blank">http://geospatialtraining.com</a></div><div>Twitter - @gistraining</div><div>Instagram - @eric_pimpler</div><div><a href="https://www.youtube.com/channel/UCBsovhqqh9xWnuTESkQdtkg" target="_blank">YouTube</a></div><div><a href="mailto:eric@geospatialtraining.com" target="_blank">eric@geospatialtraining.com</a></div><div>210-260-4992</div><div><img width="200" height="79" src="https://ci3.googleusercontent.com/mail-sig/AIorK4zH0t7YckIWXbK74Fcnz4OoIAPMMnKkeioKrH037kPtxGmWK37uZQScakRvnDdUKHWjoF10hoU"><br></div><div><br></div></div></div></div></div></div>