At every row insert index are recalculated.In .net to avoid it we can use IFeatureClassLoad to disable updating of the spatial index while data is loading https://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0025000002rz000000Is there an equivalent method with arcpy InsertCursor?
Reviewing the environment settings for arcpy, there's a note about the maintainSpatialIndex property:
Legacy:The Maintain Spatial Index environment is not honored in ArcGIS Pro. To have the same behavior as the Maintain Spatial Index environment in ArcGIS Pro when running tools and workflows that perform insert, update, and delete operations on existing data in enterprise geodatabases, control of the spatial index can be accomplished using the Remove Spatial Index tool to remove the spatial index prior to processing and the Add Spatial Index tool to re-create the spatial index after processing.The Append tool also supports this workflow with file geodatabase data.
The Maintain Spatial Index environment is not honored in ArcGIS Pro. To have the same behavior as the Maintain Spatial Index environment in ArcGIS Pro when running tools and workflows that perform insert, update, and delete operations on existing data in enterprise geodatabases, control of the spatial index can be accomplished using the Remove Spatial Index tool to remove the spatial index prior to processing and the Add Spatial Index tool to re-create the spatial index after processing.
The Append tool also supports this workflow with file geodatabase data.
So you should be able to utilize the remove spatial index and add spatial index tools to accomplish this.
https://github.com/Esri/arcgis-python-api/issues/1186thanks that's exactly what I`m doing. So it is the correct route....I thought it might had another way.It's good to have doc stating it though
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.