CalculateStatistics does not work on Query Table

1067
6
06-03-2021 06:59 AM
GKmieliauskas
Esri 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
Aashis
by Esri Contributor
Esri Contributor

Thank you for bringing the issue to our attention @GKmieliauskas.  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
GKmieliauskas
Esri 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
GKmieliauskas
Esri Regular Contributor

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

0 Kudos
Aashis
by Esri Contributor
Esri Contributor

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

0 Kudos
GKmieliauskas
Esri Regular Contributor

Yes, it is SQL Server

0 Kudos