Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037773Openbravo ERP07. Sales managementpublic2018-01-30 13:052018-02-15 12:20
egoitz 
dmiguelez 
normalmajorhave not tried
closedfixed 
5
 
3.0PR18Q13.0PR18Q1 
vmromanos
Core
No
0037773: Perfomance problems deleting an invoice on an environment with thousands of invoices and invoice lines
It takes few minutes to delete a order with only 3 lines.
-Create a order
-Add 3 lines
-Delete the order
*It takes 3 minutes.
Addding the following index improves the deletion but it is not enought.

+ <index name="C_INVOICELINE_BOMPARENT" unique="false">
+ <index-column name="BOM_PARENT_ID"/>
+ <whereClause><![CDATA[BOM_PARENT_ID IS NOT NULL]]></whereClause>
+ </index>
No tags attached.
blocks defect 0037772 closed dmiguelez Perfomance problems deleting an invoice on an environment with thousands of invoices and invoice lines 
Issue History
2018-01-30 13:13dmiguelezTypedefect => backport
2018-01-30 13:13dmiguelezTarget Version => 3.0PR18Q1
2018-01-30 17:19egoitzNote Added: 0102068
2018-02-07 13:07hgbotCheckin
2018-02-07 13:07hgbotNote Added: 0102246
2018-02-07 13:07hgbotStatusscheduled => resolved
2018-02-07 13:07hgbotResolutionopen => fixed
2018-02-07 13:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q1/rev/c6cbf47c3f32ea4b59f56ec7077052487eeabf61 [^]
2018-02-07 13:52vmromanosReview Assigned To => vmromanos
2018-02-07 13:52vmromanosNote Added: 0102250
2018-02-07 13:52vmromanosStatusresolved => closed
2018-02-07 13:52vmromanosFixed in Version => 3.0PR18Q1
2018-02-15 12:20plujanAssigned ToTriage Finance => dmiguelez

Notes
(0102068)
egoitz   
2018-01-30 17:19   
The following index are also needed:


    CREATE INDEX m_costing_invoiceline
 ON m_costing
 USING btree
 (c_invoiceline_id);

    CREATE INDEX m_matchpo_invoiceline
 ON m_matchpo
 USING btree
 (c_invoiceline_id);


CREATE INDEX m_inout_invoice
  ON m_inout (c_invoice_id)
  WHERE m_inout is not null;
(0102246)
hgbot   
2018-02-07 13:07   
Repository: erp/backports/3.0PR18Q1
Changeset: c6cbf47c3f32ea4b59f56ec7077052487eeabf61
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Feb 07 13:06:52 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q1/rev/c6cbf47c3f32ea4b59f56ec7077052487eeabf61 [^]

Fixes Issue 37773. Adds several indexes that improve performance
in basic operations like deleting an Invoice or an Order

---
M src-db/database/model/tables/C_INVOICELINE.xml
M src-db/database/model/tables/C_ORDER.xml
M src-db/database/model/tables/M_COSTING.xml
M src-db/database/model/tables/M_INOUT.xml
M src-db/database/model/tables/M_MATCHPO.xml
---
(0102250)
vmromanos   
2018-02-07 13:52   
Code review OK