Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036948Openbravo ERP02. Master data managementpublic2017-09-25 18:122018-01-08 18:20
JONHM 
AtulOpenbravo 
highmajoralways
closedfixed 
5
 
3.0PR18Q1 
dmiguelez
Core
No
0036948: Sales Invoice Dimensional Report takes long on environment with big amount of data
Sales Invoice Dimensional Report for one month takes long on environment with big amount of data.

- duration: 39659.872 ms
- m_transaction_cost table has 1449719 records.
* Environment provided by Support Department

1) Open 'Sales Invoice Dimensional Report'

 From Date: April 1,2017
 To Date : May 31, 2017
 Organization : Metal Supermarkets GTA
 Buiness partner Group : Customer
 Dimension: Product
The problem could be caused by this subquery:

SELECT Sum(cost) AS cost,
       m_transaction_id,
       c_currency_id
       FROM m_transaction_cost
       GROUP BY m_transaction_id,
                 c_currency_id
No tags attached.
? query (11,749) 2017-09-25 18:14
https://issues.openbravo.com/file_download.php?file_id=11094&type=bug
? query plan (6,933) 2017-09-25 18:14
https://issues.openbravo.com/file_download.php?file_id=11095&type=bug
txt QueryPlanAfterChange.txt (11,690) 2017-10-05 18:03
https://issues.openbravo.com/file_download.php?file_id=11142&type=bug
Issue History
2017-09-25 18:12JONHMNew Issue
2017-09-25 18:12JONHMAssigned To => Triage Finance
2017-09-25 18:12JONHMModules => Core
2017-09-25 18:12JONHMResolution time => 1508104800
2017-09-25 18:12JONHMTriggers an Emergency Pack => No
2017-09-25 18:12JONHMNote Added: 0099565
2017-09-25 18:13JONHMNote Deleted: 0099565
2017-09-25 18:14JONHMFile Added: query
2017-09-25 18:14JONHMFile Added: query plan
2017-09-25 18:48aferrazAssigned ToTriage Finance => AtulOpenbravo
2017-10-03 14:28AtulOpenbravoStatusnew => scheduled
2017-10-05 18:03AtulOpenbravoFile Added: QueryPlanAfterChange.txt
2017-10-05 18:17AtulOpenbravoNote Added: 0099778
2017-10-30 12:28hgbotCheckin
2017-10-30 12:28hgbotNote Added: 0100141
2017-10-30 12:28hgbotStatusscheduled => resolved
2017-10-30 12:28hgbotResolutionopen => fixed
2017-10-30 12:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b5a736b4e26268752f7e372e7820accf57f15e28 [^]
2017-10-30 12:30dmiguelezReview Assigned To => dmiguelez
2017-10-30 12:30dmiguelezNote Added: 0100142
2017-10-30 12:30dmiguelezStatusresolved => closed
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101362
2018-01-08 18:20dmiguelezFixed in Version => 3.0PR18Q1

Notes
(0099778)
AtulOpenbravo   
2017-10-05 18:17   
Test Plan

- Open 'Sales Invoice Dimensional Report' and apply following filters
  - From Date: April 1,2017
  - To Date : May 31, 2017
  - Organization : Metal Supermarkets GTA
  - Buiness partner Group : Customer
  - Dimension: Product

- Report takes approx. 54 secs to display information (Previously it took approx 1 min 35 secs).
(0100141)
hgbot   
2017-10-30 12:28   
Repository: erp/devel/pi
Changeset: b5a736b4e26268752f7e372e7820accf57f15e28
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Oct 05 19:43:11 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/b5a736b4e26268752f7e372e7820accf57f15e28 [^]

Fixes Issue 36948: Sales Invoice Dimensional Report takes long on environment with
big amount of data

Avoid m_transaction_cost subquery to get the sum of transaction cost

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR_data.xsql
---
(0100142)
dmiguelez   
2017-10-30 12:30   
Code Review + Testing Ok
(0101362)
hudsonbot   
2018-01-03 12:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test