Select to view content in your preferred language

How to recalculate spatial index using Esri.FileGDB version 1.5.2

568
1
03-02-2024 09:30 PM
TongZhai
New Contributor

I am using Esri.FileGDB in a C# application to open File geodatabase to query and add new records into tables. I found that the insert operation becomes increasingly slow with increasing number of records in tables inside a file geodatabase, so I am thinking how to call recalculate spatial index after inserting a large number of records programmatically, could I have a code example, I searched high and lows but couldn't find any. Thanks.

0 Kudos
1 Reply
Aashis
by Esri Contributor
Esri Contributor

Hi @TongZhai - To address slower performance like yours, you can drop the indexes before the data insert and recreate them after insertion is complete using the DDL API.  The https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase has code snippets to add/remove both spatial and attribute indexes. 

0 Kudos