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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037357
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] I. Performancemajoralways2017-11-22 12:122018-06-26 11:44
ReportergorkaionView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q2
StatusclosedFix in branchFixed in SCM revision04e13cbe6990
ProjectionnoneETAnoneTarget Version
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

0037357: Create Lines From popup on Invoice windows slow with high number of shipments

DescriptionThe Create Lines From popup is very slow when having a high number of Shipments. From both Purchase and Sales Invoice windows.

Note that issue 0037236 is already applied in the environment.
Steps To ReproduceOn a environment with a high volume of shipments. Around 2 million.

Create a new Purchase Invoice Header and open the Create Lines popup.

In the customer environment it takes minutes to load the popup.

It is also reproduced in the same button of Sales Invoice
Proposed SolutionReview the selectFromShipmentSOTrxCombo and selectFromShipment queries of CreateFrom_Invoice_data.xsql file.

We have reviewed that those are taking too much time.
TagsNo tags attached.
Attached Filestxt file icon QueryPlan.txt [^] (61,989 bytes) 2018-02-14 05:00 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0039386 closedTriage Finance Goods Shipment IsCompletelyInvoiced flag is not properly updated when voiding Sales Invoice 
causes defect 0037996 closedAtulOpenbravo Sales Order with Immediate Invoice terms does not appear in Create Invoices From Order and Create Lines From process 
causes defect 0038510 closeddmiguelez Slow updating to 18Q2 on an environment with high loads of data 

-  Notes
(0102383)
AtulOpenbravo (developer)
2018-02-14 04:59

In customer environment,

Modulescript updated 2244037 shipments in 3919177 ms.

Sales flow:-

Sales Invoice Document No SCHISI6823, create lines from popup opens in
Run#1: 28 sec
Run#2: 9 sec
Run#3: 8 sec
Run#4: 8 sec

Purchase flow:-

Recreating index:

DROP INDEX m_matchpo_ship;

CREATE INDEX m_matchpo_ship
  ON m_matchpo
  USING btree
  (c_orderline_id COLLATE pg_catalog."default", m_inoutline_id COLLATE pg_catalog."default");

ANALYZE M_MATCHPO;

Purchase Invoice Document No ISPI108,create lines from popup opens in
Run#1: 3.57 sec
Run#2: 3.23 sec
Run#3: 2.83 sec
Run#4: 2.67 sec
(0102548)
hgbot (developer)
2018-02-21 11:32

Repository: erp/devel/pi
Changeset: 04e13cbe699011586c6681dd57733123666a2071
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Feb 20 18:12:35 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/04e13cbe699011586c6681dd57733123666a2071 [^]

Fixes Issue 37357:Create Lines From popup on Invoice windows slow
with high number of shipments

** Add iscompletelyinvoiced column in m_inout, add AD elements for it.
** Implement modulescript to update iscompletelyinvoiced flag for old
shipments.
** Define index for iscompletelyinvoiced flag on m_inout and make
use of flag in the where clause of the query.
** Modify M_InOut_Post and C_Invoice_Post db procedures to update
iscompletelyinvoiced flag properly.
** Iscompletelyinvoiced flag is used only in Sales Flow and shown in
Goods Shipment window.
** Add functional index OBEQUALS(QTYDELIVERED,QTYINVOICED) on c_orderline.
** Modify C_Invoice_Candidate_V to make use functional index.
** Add junit test cases to test iscompletelyinvoiced flag updation.

---
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/model/functions/M_INOUT_POST.xml
M src-db/database/model/tables/C_ORDERLINE.xml
M src-db/database/model/tables/M_INOUT.xml
M src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-test/src/org/openbravo/test/AllAntTaskTests.java
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIConstants.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIInvoiceHeaderParameters.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIInvoiceLineParameters.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIOrderHeaderParameters.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIOrderLineParameters.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIShipmentHeaderParameters.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIShipmentLineParameters.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIUtility.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/IsCompletelyInvoicedShipment.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/IsCompletelyInvoicedShipmentMultiLineTest.java
A src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/IsCompletelyInvoicedShipmentOneLineTest.java
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateIsCompletelyInvoiced.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateIsCompletelyInvoicedData.class
A src-util/modulescript/src/org/openbravo/modulescript/UpdateIsCompletelyInvoiced.java
A src-util/modulescript/src/org/openbravo/modulescript/UpdateIsCompletelyInvoiced_data.xsql
---
(0102552)
hgbot (developer)
2018-02-21 12:53

Repository: erp/devel/pi
Changeset: 5591d21a0627d2299c6a60fad1fa0ab553cb7175
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Feb 21 12:53:07 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5591d21a0627d2299c6a60fad1fa0ab553cb7175 [^]

Related to issue 37357. Exported database to fix the order
of the indexes in the orderline table

---
M src-db/database/model/tables/C_ORDERLINE.xml
---
(0102574)
hgbot (developer)
2018-02-22 09:10

Repository: erp/devel/pi
Changeset: 6b20e7da0de33d7247e09c566a056be6bc6f79ce
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Feb 22 09:09:51 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6b20e7da0de33d7247e09c566a056be6bc6f79ce [^]

Related to Issue 37357.

* Changed initialization of Longs. Instead of new Long("10") use 10L
  to avoid warnings in Java 9
* Use setAdminMode(true) instead of setAdminMode()
* Remove unnecessary flush
* Log correctly the exceptions and do not launch e.printStackTrace()

---
M src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIInvoiceLineParameters.java
M src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIOrderLineParameters.java
M src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/ICIUtility.java
M src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/IsCompletelyInvoicedShipmentMultiLineTest.java
M src-test/src/org/openbravo/test/materialMgmt/iscompletelyinvoicedshipment/IsCompletelyInvoicedShipmentOneLineTest.java
---
(0102587)
hgbot (developer)
2018-02-22 11:23

Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: 286d585b614ab590a1ea8793679719a664663a52
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Thu Feb 22 11:10:23 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/286d585b614ab590a1ea8793679719a664663a52 [^]

Related to issue 37357: Fix retail pack sampledata dbconsistency

---
M referencedata/sampledata/The_White_Valley_Group/M_INOUT.xml
---
(0102589)
gorka_gil (administrator)
2018-02-22 11:26
edited on: 2018-02-22 11:29

Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: 34b97501a0b8
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Thu Feb 22 11:22:18 2018 +0100
URL: http://code.openbravo.com/erp/pmods-branches/org.openbravo.test.mobile.sampledata/rev/34b97501a0b8 [^]

Related to issue 37357: Fix retail modules sampledata dbconsistency

---
M referencedata/sampledata/The_White_Valley_Group/M_INOUT.xml
---

(0102784)
hudsonbot (developer)
2018-02-22 18:19

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/980a6ad5bbf5 [^]
Maturity status: Test
(0102786)
hudsonbot (developer)
2018-02-22 18:19

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/980a6ad5bbf5 [^]
Maturity status: Test
(0102792)
hudsonbot (developer)
2018-02-22 18:19

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/980a6ad5bbf5 [^]
Maturity status: Test
(0102851)
hgbot (developer)
2018-02-27 12:59

Repository: erp/devel/pi
Changeset: 149e5d9ac93d9fd5e98a7aa99feb0a306dc06f59
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Feb 27 12:59:41 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/149e5d9ac93d9fd5e98a7aa99feb0a306dc06f59 [^]

Related to issue 37357. Removed unnecessary index.

There is already a similar index, with the c_order_id included.
This index is not needed since the other one is used (orderlines are
also filtered by order)

---
M src-db/database/model/tables/C_ORDERLINE.xml
---
(0102957)
hudsonbot (developer)
2018-03-02 21:18

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/05dece3dc80b [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-11-22 12:12 gorkaion New Issue
2017-11-22 12:12 gorkaion Assigned To => platform
2017-11-22 12:12 gorkaion Modules => Core
2017-11-22 12:12 gorkaion Triggers an Emergency Pack => No
2017-11-22 12:12 gorkaion Assigned To platform => Triage Finance
2017-11-23 09:29 vmromanos Assigned To Triage Finance => AtulOpenbravo
2017-11-30 13:18 AtulOpenbravo Status new => scheduled
2017-12-01 12:58 AtulOpenbravo Status scheduled => feedback
2017-12-20 08:07 AtulOpenbravo Status feedback => scheduled
2018-01-15 10:35 dmiguelez Type defect => design defect
2018-02-14 04:59 AtulOpenbravo Note Added: 0102383
2018-02-14 05:00 AtulOpenbravo File Added: QueryPlan.txt
2018-02-21 11:32 hgbot Checkin
2018-02-21 11:32 hgbot Note Added: 0102548
2018-02-21 11:32 hgbot Status scheduled => resolved
2018-02-21 11:32 hgbot Resolution open => fixed
2018-02-21 11:32 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/04e13cbe699011586c6681dd57733123666a2071 [^]
2018-02-21 12:00 dmiguelez Review Assigned To => dmiguelez
2018-02-21 12:00 dmiguelez Status resolved => closed
2018-02-21 12:00 dmiguelez Fixed in Version => 3.0PR18Q2
2018-02-21 12:53 hgbot Checkin
2018-02-21 12:53 hgbot Note Added: 0102552
2018-02-22 09:10 hgbot Checkin
2018-02-22 09:10 hgbot Note Added: 0102574
2018-02-22 11:23 hgbot Checkin
2018-02-22 11:23 hgbot Note Added: 0102587
2018-02-22 11:26 gorka_gil Note Added: 0102589
2018-02-22 11:27 gorka_gil Note Edited: 0102589 View Revisions
2018-02-22 11:29 gorka_gil Note Edited: 0102589 View Revisions
2018-02-22 18:19 hudsonbot Checkin
2018-02-22 18:19 hudsonbot Note Added: 0102784
2018-02-22 18:19 hudsonbot Checkin
2018-02-22 18:19 hudsonbot Note Added: 0102786
2018-02-22 18:19 hudsonbot Checkin
2018-02-22 18:19 hudsonbot Note Added: 0102792
2018-02-23 09:18 AtulOpenbravo Relationship added causes 0037996
2018-02-27 12:59 hgbot Checkin
2018-02-27 12:59 hgbot Note Added: 0102851
2018-03-02 21:18 hudsonbot Checkin
2018-03-02 21:18 hudsonbot Note Added: 0102957
2018-05-09 16:36 JONHM Relationship added causes 0038510
2018-05-09 16:50 JONHM Issue Monitored: JONHM
2018-05-09 16:50 JONHM Issue End Monitor: JONHM
2018-06-26 11:44 hgbot Checkin
2018-06-26 11:44 hgbot Note Added: 0105440
2018-06-26 14:03 gorka_gil Note Deleted: 0105440
2018-10-02 08:59 AtulOpenbravo Relationship added related to 0039386


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker