Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036403Openbravo ERP02. Master data managementpublic2017-07-04 15:312017-08-16 09:30
malsasua 
malsasua 
normalmajoralways
closedunable to reproduce 
5
 
 
Core
No
0036403: M_PriceList_Create process is very slow with a big volume
in customers with a big volume (60 pricelists, 70.000 products) the process to create a new pricelist is very slow (more than one hour)
. go to pricelist window
. go to version tab
. click in create price list, selecting a base pricelist with 70.000 products
Performance
related to defect 00296643.0PR15Q3 closed vmromanos Create Price List process is slow 
png pricelistCreation.png (149,368) 2017-07-04 18:53
https://issues.openbravo.com/file_download.php?file_id=10886&type=bug
png
Issue History
2017-07-04 15:31malsasuaNew Issue
2017-07-04 15:31malsasuaAssigned To => Triage Finance
2017-07-04 15:31malsasuaModules => Core
2017-07-04 15:31malsasuaResolution time => 1500415200
2017-07-04 15:31malsasuaTriggers an Emergency Pack => No
2017-07-04 15:32malsasuaTag Attached: Performance
2017-07-04 16:20vmromanosRelationship addedrelated to 0029664
2017-07-04 16:27aferrazAssigned ToTriage Finance => markmm82
2017-07-04 17:36markmm82Statusnew => scheduled
2017-07-04 18:53malsasuaFile Added: pricelistCreation.png
2017-07-05 09:02vmromanosNote Added: 0097863
2017-07-05 09:11vmromanosNote Edited: 0097863bug_revision_view_page.php?bugnote_id=0097863#r15461
2017-07-05 09:40aferrazSummaryprocess: m_create_pricelist is very slow with a big volume => M_PriceList_Create process is very slow with a big volume
2017-07-05 13:12aferrazResolution time1500415200 => 1500933600
2017-07-27 10:07aferrazAssigned Tomarkmm82 => malsasua
2017-07-27 10:07aferrazNote Added: 0098239
2017-07-27 10:07aferrazStatusscheduled => feedback
2017-08-16 09:30malsasuaStatusfeedback => closed
2017-08-16 09:30malsasuaResolutionopen => unable to reproduce

Notes
(0097863)
vmromanos   
2017-07-05 09:02   
(edited on: 2017-07-05 09:11)
Just guessing possible performance problems:

1. These queries look very ugly. They don't look like using any index or restrictive where clause.
Try to launch these queries in testing environment to track time.
Refactor them and/or add indexes.

    UPDATE M_Product_PO SET PriceList=0 WHERE PriceList IS NULL;
    UPDATE M_Product_PO SET PriceLastPO=0 WHERE PriceLastPO IS NULL;
    UPDATE M_Product_PO
      SET PricePO=PriceLastPO
    WHERE(PricePO IS NULL
      OR PricePO=0)
      AND PriceLastPO<>0;
    UPDATE M_Product_PO SET PricePO=0 WHERE PricePO IS NULL;

IMHO these queries are really not needed by this process and we should think about deleting them if we don't find any good reason to keep them.


2. Usage of AD_ISORGINCLUDED in an environment with many organizations. Maybe backporting 0035590 could work?


Important: according to reporter, we just need to focus in pricelist NOT based on cost; that reduces the flows in the PL code we need to focus on.

(0098239)
aferraz   
2017-07-27 10:07   
Waiting for customer environment.