A poor performance on FileGeoDatabase Api

06-10-2018 06:58 PM
New Contributor II

Hi, I tried to getting the count of some filegeodatabase rows with "File Geodatabase API 1.4", but the performance is very poor as following statements:

The Source code

Geodatabase geodatabase = Geodatabase.Open(@"xxxxxx");

var countStatements = $"SELECT count(*) FROM blk WHERE OBJECTID=1 or OBJECTID=2";
var countRows = geodatabase.ExecuteSQL(countStatements);

var countEnumerator = countRows.GetEnumerator();

if(countRows != null)
       count = (int)countEnumerator.Current.GetDouble(0);

It took about two seconds to getting the result. The performance is very poor!

How can I promote the performance through query sql statements or the other approach?

I’m very appreciate for your any help.


I have posted it to the File GeoDatabase API discuss : How to promote the performance on querying filegeodatabase entries count?? 



Casper. Lee

0 Kudos
0 Replies