Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039349Openbravo ERP02. Master data managementpublic2018-09-25 13:582019-05-21 15:17
samuel_nicuesa 
AtulOpenbravo 
normalmajoralways
closedfixed 
5
pi 
3.0PR19Q3 
Sandrahuguet
Core
No
0039349: Return from Customer pick/edit lines process takes more time to be loaded on an environment with thousands of orders.
Return from Customer pick/edit lines process takes more time to be loaded on an environment with thousands of orders.

This problem has been reported by one client that has a lot of records in this window.
[BO]

Navigate to Return from customer window , select one record and click on Pick/Edit line.

If you have thousand of orders the process takes more time to finish.
Performance
depends on feature request 0029943 closed alostale support to define DB functions volatility 
related to defect 0040865 closed AtulOpenbravo Set VOLATILITY LEVEL for Database functions 
Issue History
2018-09-25 13:58samuel_nicuesaNew Issue
2018-09-25 13:58samuel_nicuesaAssigned To => Triage Finance
2018-09-25 13:58samuel_nicuesaModules => Core
2018-09-25 13:58samuel_nicuesaResolution time => 1539640800
2018-09-25 13:58samuel_nicuesaTriggers an Emergency Pack => No
2018-09-25 17:34SandrahuguetTag Attached: Performance
2018-09-27 12:46SandrahuguetAssigned ToTriage Finance => markmm82
2018-10-02 17:01markmm82Statusnew => scheduled
2018-10-19 08:09vmromanosRelationship addeddepends on 0029943
2018-10-19 16:37markmm82Note Added: 0107464
2018-10-19 16:40markmm82Note Edited: 0107464bug_revision_view_page.php?bugnote_id=0107464#r17797
2018-10-22 17:10vmromanosResolution time1539640800 =>
2018-10-22 17:10vmromanosNote Added: 0107497
2018-10-31 17:28vmromanosAssigned Tomarkmm82 => Triage Finance
2018-10-31 17:28vmromanosStatusscheduled => acknowledged
2019-05-06 10:43AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2019-05-06 10:43AtulOpenbravoStatusacknowledged => scheduled
2019-05-09 08:27hgbotCheckin
2019-05-09 08:27hgbotNote Added: 0111582
2019-05-09 08:27hgbotStatusscheduled => resolved
2019-05-09 08:27hgbotResolutionopen => fixed
2019-05-09 08:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/eac83131aa3f2e7a2d1682cb421ac848cf85e4f0 [^]
2019-05-09 08:44SandrahuguetReview Assigned To => Sandrahuguet
2019-05-09 08:44SandrahuguetNote Added: 0111583
2019-05-09 08:44SandrahuguetStatusresolved => closed
2019-05-09 08:44SandrahuguetFixed in Version => 3.0PR19Q3
2019-05-13 18:16AtulOpenbravoRelationship addedrelated to 0040865
2019-05-21 15:17hudsonbotCheckin
2019-05-21 15:17hudsonbotNote Added: 0112023

Notes
(0107464)
markmm82   
2018-10-19 16:37   
(edited on: 2018-10-19 16:40)
The main performance problem presented by the executed query is the number of calls made to the function: m_get_default_aum_for_document.
 
Since this function does not make modifications to the database, it can be changed to stable type [1] and with this change the query improves the performance and costs almost a minute to 5s.

At the moment, this property is not supported by the platform when the database is exported (export.database), so while temporarily solving the performance problem, the definition of the function can be modified directly in the client environment of the following way:

alter function m_get_default_aum_for_document (varchar, varchar) STABLE;

It is very important to keep in mind that any future update of the system will cause this change to be lost until this type of function is supported on the platform.

[1] https://www.postgresql.org/docs/9.5/static/sql-createfunction.html [^]

(0107497)
vmromanos   
2018-10-22 17:10   
This issue is blocked by a feature request.

Removed resolution time.
Patch has been sent to the customer. Once the FR is fixed, we will fix this issue too.
(0111582)
hgbot   
2019-05-09 08:27   
Repository: erp/devel/pi
Changeset: eac83131aa3f2e7a2d1682cb421ac848cf85e4f0
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon May 06 14:08:39 2019 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/eac83131aa3f2e7a2d1682cb421ac848cf85e4f0 [^]

Fixes Issue 0039349: Return from Customer pick/edit lines process
takes more time to be loaded on an environment with thousands of
orders.

** Modified volatility level of db function
M_GET_DEFAULT_AUM_FOR_DOCUMENT as STABLE

---
M src-db/database/model/functions/M_GET_DEFAULT_AUM_FOR_DOCUMENT.xml
---
(0111583)
Sandrahuguet   
2019-05-09 08:44   
code review + testing ok
(0112023)
hudsonbot   
2019-05-21 15:17   
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/9b8f37d9d85e [^]
Maturity status: Test