Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038772Openbravo ERPI. Performancepublic2018-06-15 15:362019-06-13 09:55
markmm82 
markmm82 
highmajoralways
closedfixed 
5
 
3.0PR18Q3 
vmromanos
Core
No
0038772: Needed index on M_MATCHPO to improve performance in Create Lines From popup on Invoice windows
The Create Lines From popup is very slow when having a high number of Orders realted to a business partner. From both Purchase and Sales Invoice windows.
It is caused by a query that is executed for every candidate order validating that exists lines that can be invoiced and to do that is requested information from M_MATCHPO.
On a environment with a high volume of orderds. Around 8 million.
Create a new Purchase Invoice Header and open the Create Lines popup.
In the customer environment it takes minutes to load the popup.
Create a new index on M_MatchPO (c_orderline_id, c_invoiceline_id) where c_invoiceline_id is not null
Performance
depends on backport 00387733.0PR18Q2.1 closed markmm82 Needed index on M_MATCHPO to improve performance in Create Lines From popup on Invoice windows 
depends on backport 00387743.0PR18Q1.4 closed markmm82 Needed index on M_MATCHPO to improve performance in Create Lines From popup on Invoice windows 
Issue History
2018-06-15 15:36markmm82New Issue
2018-06-15 15:36markmm82Assigned To => markmm82
2018-06-15 15:36markmm82Modules => Core
2018-06-15 15:36markmm82Triggers an Emergency Pack => No
2018-06-15 16:19markmm82Statusnew => scheduled
2018-06-19 13:42hgbotCheckin
2018-06-19 13:42hgbotNote Added: 0105251
2018-06-19 13:42hgbotStatusscheduled => resolved
2018-06-19 13:42hgbotResolutionopen => fixed
2018-06-19 13:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/de5ea8bf7fce059eb002ff346480e531ded1ecee [^]
2018-06-19 13:45vmromanosReview Assigned To => vmromanos
2018-06-19 13:45vmromanosNote Added: 0105254
2018-06-19 13:45vmromanosStatusresolved => closed
2018-06-19 13:45vmromanosFixed in Version => 3.0PR18Q3
2018-06-19 17:43hudsonbotCheckin
2018-06-19 17:43hudsonbotNote Added: 0105263
2019-06-13 09:55SandrahuguetTag Attached: Performance

Notes
(0105251)
hgbot   
2018-06-19 13:42   
Repository: erp/devel/pi
Changeset: de5ea8bf7fce059eb002ff346480e531ded1ecee
Author: Mark <markmm82 <at> gmail.com>
Date: Thu Jun 14 19:20:21 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/de5ea8bf7fce059eb002ff346480e531ded1ecee [^]

Fixes issue 38772:Index on M_MATCHPO to improve performance in Create Lines From

Caused by a query that is executed for every candidate order validating that exists lines that can be
invoiced requesting information from M_MATCHPO, the Create Lines From process on Invoice windows has
bad performance and to be improved waa needed to add a new index in C_ORDERLINE_ID and C_INVOICELINE_ID
columns taking into account those records where C_INVOICELINE_ID IS NOT NULL.

---
M src-db/database/model/tables/M_MATCHPO.xml
---
(0105254)
vmromanos   
2018-06-19 13:45   
Code review + testing OK
(0105263)
hudsonbot   
2018-06-19 17:43   
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/1adac736b09e [^]
Maturity status: Test