Skip to main content

I have a File Geodatabase (ArcObjects) Writer that points to a FileGDB I
want to update. When the Writer Mode=UPDATE, the feature count from
Reader to Writer is very slow, at a rate of ~1 feature per second. If I
were to perform DELETE first and then INSERT as a way to update, then
it's very fast.

Why might UPDATE be so slow? There are 2 bottlenecks I think might be occurring:

  • The field I'm updating on is not a unique field - This field represents a "tile" of records, by which I want to update on a tile-by-tile basis.
  • Grid
    1 is set to 100. When updating database tables, it's recommended that
    one removes spatial indexing, perform update, then recreate the index.
    Is there a way to do that with the FileGDB ArcObjects Writer? Might I
    have to use PythonCaller to call arcpy.RemoveSpatialIndex()?

Make sure that your key field ("FILENAME" in your specific workbench) is indexed in the file geodatabase. You can e.g. use ArcCatalog to add an non-unique index to the field.

This is particularly important if the feature class to update contains a lot of data.


Make sure that your key field ("FILENAME" in your specific workbench) is indexed in the file geodatabase. You can e.g. use ArcCatalog to add an non-unique index to the field.

This is particularly important if the feature class to update contains a lot of data.

Ah, I forgot about the non-spatial index.

 

 

Let's say it's not possible to manually open ArcCatalog to add the index. Is it possible to do it through FME? Might I have to rely on PythonCaller to call arcpy.AddIndex_management()?

 


Ah, I forgot about the non-spatial index.

 

 

Let's say it's not possible to manually open ArcCatalog to add the index. Is it possible to do it through FME? Might I have to rely on PythonCaller to call arcpy.AddIndex_management()?

 

I think you either have to do it using ArcCatalog (manually) or through arcpy (programatically).

Make sure that your key field ("FILENAME" in your specific workbench) is indexed in the file geodatabase. You can e.g. use ArcCatalog to add an non-unique index to the field.

This is particularly important if the feature class to update contains a lot of data.

Found this through searching for why FGDB Update Writer going slowly, although in my case the Key field is indexed.

 

You can add indices to FGDBs using FME by setting the SQL To Run Before Write, or the SQL to Run After Write (depending on situation) by entering it like below. The FGDB API will convert the FME SQL statements into the relevant FGDB actions as it has limited support for parsing some SQL statements via the API.

FME_SQL_DELIMITER ;
CREATE INDEX indexName1 ON TableName (FieldName1);
CREATE INDEX indexName2 ON TableName (FieldName2);
...

Reply