AnsweredAssumed Answered

Inconsistent chart and table totals in scheduled report... sometimes.

Question asked by Francesca Shiekh on Dec 26, 2018
Latest reply on Jan 3, 2019 by Francesca Shiekh

I have a scheduled report that is pretty heavy and sometimes has inconsistent record count totals between the chart and the table. The key word is "sometimes". I am unable to reproduce the inconsistency from the Reports module, and the scheduled reports only disagree in some runs, not all.


We have our Sugar configured to use the slave database for reports.


Do reports run two queries one for the table data and one for the chart data?

If so, do they both run from the slave database if $db['reports'] is defined in config?


I can see two possible scenarios causing the discrepancy, in both cases there would have to be two queries, one for the table and one for the chart. Either the queries run one on the slave and one on the main database but the two are not in sync yet, or the two queries run on the slave and between queries the replication catches up. 



Any thoughts?