CalculateStatistics does not work on Query Table

220
6
3 weeks ago
GintautasKmieliauskas
Regular Contributor

Hi,

I have "QueryTable" type table on enterprise database. I would like to calculate some statistics on it. CalculateStatistics method throws exeception "A geodatabase-related exception has occurred".

The same code with exported to gdb table works fine.

Does anyone have experience in working  with statistics on QueryTable type tables?

0 Kudos
6 Replies
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Which Enterprise database are you using and what type of statistics are you trying to get?

0 Kudos
AashisLamsal1
Esri Contributor

Thank you for bringing the issue to our attention @GintautasKmieliauskas.  We logged it as a bug, and our dev team will investigate the cause, and then we will let you know the solution or any workaround to the issue.

0 Kudos
GintautasKmieliauskas
Regular Contributor

Thank you for the information.

I have another one  issue related to "QueryTable" type table. GetCount from table takes about 40s on 3600 records when on the same structure of regular table it takes a moment to count rows. There is no difference to call GetCount or walk thru Search cursor and count records by myself. Is it specific to "QueryTable" or something wrong in implementation?

P.s. I have found that my "QueryTable" isn't registered with the geodatabase.  Could registration help me with performance issue?

0 Kudos
GintautasKmieliauskas
Regular Contributor

We have solved issue with GetCount by indexing primary table field.

0 Kudos
AashisLamsal1
Esri Contributor

@GintautasKmieliauskas What enterprise geodatabase are you using? Is it SQL Sever?

0 Kudos
GintautasKmieliauskas
Regular Contributor

Yes, it is SQL Server

0 Kudos