We picked up a client who is running 4.4.06 (MAS 200) with a custom report using AR_InvoiceHistoryHeader, AR_InvoiceHistoryDetail and SO_ShipToAddress. When you run the report for a single day, the report finishes within 5 seconds. If you run 2 days or greater the report will take longer than an hour. All 3 tables have been rebuilt. We are trying to figure out why the disparity once you add a 2nd day to the report. Any ideas would be appreciated.
I've created the report in Intelligence and it takes 2 minutes to run for the complete month but the client doesn't want to use Intelligence. (After doing a test migration to 2014)
The record selection is:
{AR_InvoiceHistoryHeader.InvoiceDate} in {?StartDate} to {?EndDate}
and
{AR_InvoiceHistoryDetail.ItemType} <> ""4""
and
{@state_chk}<>0
and
{AR_InvoiceHistoryHeader.ModuleCode} = ""S/O