Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038605
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] I. Performancemajoralways2018-05-09 16:362018-05-23 15:30
ReporterJONHMView Statuspublic 
Assigned Todmiguelez 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q2.1
StatusclosedFix in branchFixed in SCM revision9ac3c2f0a875
ProjectionnoneETAnoneTarget Version3.0PR18Q2.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038605: Slow updating to 18Q2 on an environment with high loads of data

DescriptionSlow updating to 18Q2 on an environment with high loads of data. It seems to be related to UpdateIsCompletelyInvoiced modulescript, published on that same version.
Steps To ReproduceHaving an environment with high loads of data:
m_inout = 628114
m_inoutline = 2983732
c_invoice = 585358
c_invoiceline = 1547408

Update to 18Q2. The performance of this query will last for hours:

UPDATE M_InOut
        SET iscompletelyinvoiced = 'Y'
        WHERE issotrx = 'Y'
        AND NOT EXISTS (SELECT 1 FROM M_INOUTLINE l
                        LEFT JOIN c_invoiceline il ON l.m_inoutline_id = il.m_inoutline_id
                        LEFT JOIN c_invoice i ON il.c_invoice_id = i.c_invoice_id
                        WHERE l.M_INOUT_ID = M_InOut.M_INOUT_ID
                        GROUP BY l.m_inoutline_id, l.movementqty
                        HAVING ( l.movementqty >= 0 AND l.movementqty > Sum(COALESCE(CASE WHEN i.docstatus = 'CO' THEN il.qtyinvoiced ELSE 0 END, 0)) )
                             OR ( l.movementqty < 0 AND l.movementqty < Sum(COALESCE(CASE WHEN i.docstatus = 'CO' THEN il.qtyinvoiced ELSE 0 END, 0)) ) )
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0038510 closeddmiguelez Slow updating to 18Q2 on an environment with high loads of data 

-  Notes
(0104647)
hgbot (developer)
2018-05-23 13:34

Repository: erp/backports/3.0PR18Q2.1
Changeset: 9ac3c2f0a875663adc151dc7a39f0acac8c3bf0a
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed May 16 00:04:54 2018 +0530
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.1/rev/9ac3c2f0a875663adc151dc7a39f0acac8c3bf0a [^]

Fixes Issue 38605:Slow updating to 18Q2 on an environment
with high loads of data

In general no of shipment completely invoice are more as compare to
that are not completely invoiced. Hence mddulescript logic is changed
to update iscompletelyinvoiced as No for the applicable shipments.
For rest of the existing shipments flag is set as Yes using
onCreateDefault for iscompletelyinvoiced column of M_Inout table.

---
M src-db/database/model/tables/M_INOUT.xml
M src-util/modulescript/src/org/openbravo/modulescript/UpdateIsCompletelyInvoiced_data.xsql
---
(0104648)
hgbot (developer)
2018-05-23 13:34

Repository: erp/backports/3.0PR18Q2.1
Changeset: 36053cb67cf9f96b0faa4e521ae8f7ab687439fb
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed May 16 14:31:08 2018 +0530
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.1/rev/36053cb67cf9f96b0faa4e521ae8f7ab687439fb [^]

Related to Issue 38605:Sample data updated in QA testing for
IsCompletelyInvoiced flag in M_Inout

---
M referencedata/sampledata/QA_Testing/M_INOUT.xml
---
(0104649)
dmiguelez (developer)
2018-05-23 13:34

Code Review + Testing Ok
(0104653)
hgbot (developer)
2018-05-23 15:30

Repository: erp/backports/3.0PR18Q2.1
Changeset: 4dc6ea55b227497484c6278425c22bc53b38b9d9
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed May 23 15:30:28 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.1/rev/4dc6ea55b227497484c6278425c22bc53b38b9d9 [^]

Related to Issue 38605.

Added missing .class file

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateIsCompletelyInvoicedData.class
---

- Issue History
Date Modified Username Field Change
2018-05-23 13:10 dmiguelez Type defect => backport
2018-05-23 13:10 dmiguelez Target Version => 3.0PR18Q2.1
2018-05-23 13:34 hgbot Checkin
2018-05-23 13:34 hgbot Note Added: 0104647
2018-05-23 13:34 hgbot Status scheduled => resolved
2018-05-23 13:34 hgbot Resolution open => fixed
2018-05-23 13:34 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/7e3181b595b0a65ddc7d04c42e41a40bbfb5cc0c [^] => http://code.openbravo.com/erp/backports/3.0PR18Q2.1/rev/9ac3c2f0a875663adc151dc7a39f0acac8c3bf0a [^]
2018-05-23 13:34 hgbot Checkin
2018-05-23 13:34 hgbot Note Added: 0104648
2018-05-23 13:34 dmiguelez Note Added: 0104649
2018-05-23 13:34 dmiguelez Status resolved => closed
2018-05-23 13:34 dmiguelez Fixed in Version => 3.0PR18Q2.1
2018-05-23 15:30 hgbot Checkin
2018-05-23 15:30 hgbot Note Added: 0104653


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker