System was not able to get record count message when running GI

  • 12 April 2021
  • 9 replies
  • 1230 views

Userlevel 5
Badge +2

We have a custom GI which is showing this message in the status bar:

Same query exists in two tenants but only one of them (the one with more data) shows the message.


9 replies

Userlevel 1
Badge

To calculate the count *and* display the results, the system needs to run two queries. To ensure responsiveness of the application, the Generic Inquiry system will wait for a predetermined amount of time (a few seconds -- I don’t remember the exact length). If the count of records is not returned in the allotted time, the query is canceled and the GI will only display the records.

 

is it possible to extend the time allowed for the record count query?

when the results are not calculated, the data cannot be exported to excel.

 

 

“ In some cases it can simply be because you’re missing a field in the relationship (ex: joining by OrderNbr instead of OrderType,OrderNbr). “

 

This is what fixed my GI, tightening up the joins caused the records to display. 

 

Thanks Gabriel!

Userlevel 4
Badge

Thanks for this thread, and the suggestions, very useful.  We are on a SaaS model so SQL analysis will be tricky.  Sometimes we get this error and sometimes we don’t.  I have a particular (fairly simple) GI on the table AUAuditValues, which I am sorting by change date descending (the other indices don’t work for us) and this is where we sometimes see it.  Maybe it’s internet speed related.  Currently ± 3 million records.

Userlevel 7
Badge +17

Thanks a lot @Gabriel Michaud for the detailed explanation.

Userlevel 7
Badge +10

To calculate the count *and* display the results, the system needs to run two queries. To ensure responsiveness of the application, the Generic Inquiry system will wait for a predetermined amount of time (a few seconds -- I don’t remember the exact length). If the count of records is not returned in the allotted time, the query is canceled and the GI will only display the records.

More than likely, this means that you have a complex join expression or condition that requires full table scans instead of faster clustered index operations.

Analysis of the SQL Query Execution plan through SQL Management Studio is recommended in such cases. In some cases it can simply be because you’re missing a field in the relationship (ex: joining by OrderNbr instead of OrderType,OrderNbr). You might be missing an index somewhere as well.

Userlevel 7
Badge +7

Hi @RoyceLithgo ,

I have also seen this message with complex custom GIs.  It can be intermittent, and in my experience it seems to be associated with the runtime of the query, not necessarily the final number of records returned.  In addition to the warning message, we noticed that aggregate totals do not display in this situation.  If you continue to have issues, depending on your requirements, a workaround may be to build a custom report using Report Designer.  On the report you can of course include the aggregate totals, and there is also the ability to define an Excel export if needed.

Laura

Userlevel 7
Badge +17

That's great :) Thanks for sharing the update.

Userlevel 5
Badge +2

Thanks for the reply @Naveen B. I found that the problem had to do with some sort of corruption with the Site Map. When I removed the Query from the UI and added it back again (no other changes made at all), the record count appeared. So weird. 

Userlevel 7
Badge +17

Hi, @RoyceLithgo,

I have verified in my system, GI is showing a record count for 10 million records as well.

Could you please let us know how much huge data you are trying to retrieve in the GI?

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved