Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0033994 | Openbravo ERP | 04. Warehouse management | public | 2016-07-01 14:25 | 2016-11-04 15:08 |
|
Reporter | VictorVillar | |
Assigned To | dmiguelez | |
Priority | immediate | Severity | critical | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 3.0PR16Q3.3 | Fixed in Version | 3.0PR16Q3.3 | |
Merge Request Status | |
Review Assigned To | aferraz |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0033994: Bad performance Costing Background process using 3 types of adjustments |
Description | Bad performance Costing Background process using 3 types of adjustments |
Steps To Reproduce | Bad performance Costing Background process using 3 types of adjustments: Backdated, Price Cost Correction, Negative Stock correction.
This query is taking more than 1.5 seconds:
2016-07-01 04:21:54 CDT LOG: duration: 1699.337 ms execute S_18203/C_18204: select max(materialmg0_.MovementDate) as col_0_0_ from M_Transaction materialmg0_ where materialmg0_.IsCostCalculated='Y' and (materialmg0_.AD_Org_ID in ($1)) |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | blocks | defect | 0033411 | 3.0PR17Q1 | closed | dmiguelez | Bad performance Costing Background process using 3 types of adjustments |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2016-09-14 18:27 | aferraz | Type | defect => backport |
2016-09-14 18:27 | aferraz | Target Version | => 3.0PR16Q3.2 |
2016-09-29 17:52 | dmiguelez | Target Version | 3.0PR16Q3.2 => 3.0PR16Q3.3 |
2016-11-03 21:08 | hgbot | Checkin | |
2016-11-03 21:08 | hgbot | Note Added: 0091147 | |
2016-11-03 21:08 | hgbot | Status | scheduled => resolved |
2016-11-03 21:08 | hgbot | Resolution | open => fixed |
2016-11-03 21:08 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/backports/3.0PR16Q3.3/rev/fa2a7bc604de5c1955078e50ed2300349483722e [^] |
2016-11-03 21:08 | hgbot | Checkin | |
2016-11-03 21:08 | hgbot | Note Added: 0091148 | |
2016-11-03 21:08 | hgbot | Checkin | |
2016-11-03 21:08 | hgbot | Note Added: 0091149 | |
2016-11-03 21:08 | hgbot | Checkin | |
2016-11-03 21:08 | hgbot | Note Added: 0091150 | |
2016-11-03 21:08 | hgbot | Checkin | |
2016-11-03 21:08 | hgbot | Note Added: 0091151 | |
2016-11-03 21:08 | hgbot | Checkin | |
2016-11-03 21:08 | hgbot | Note Added: 0091152 | |
2016-11-03 21:09 | aferraz | Review Assigned To | => aferraz |
2016-11-03 21:09 | aferraz | Note Added: 0091153 | |
2016-11-03 21:09 | aferraz | Status | resolved => closed |
2016-11-03 21:09 | aferraz | Fixed in Version | => 3.0PR16Q3.3 |
2016-11-04 15:06 | hgbot | Checkin | |
2016-11-04 15:06 | hgbot | Note Added: 0091176 | |
2016-11-04 15:08 | aferraz | Note Deleted: 0091153 | |
2016-11-04 15:08 | aferraz | Note Added: 0091179 | |
Notes |
|
(0091147)
|
hgbot
|
2016-11-03 21:08
|
|
Repository: erp/backports/3.0PR16Q3.3
Changeset: fa2a7bc604de5c1955078e50ed2300349483722e
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Mon Sep 26 19:57:27 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q3.3/rev/fa2a7bc604de5c1955078e50ed2300349483722e [^]
Fixes issue 33994: Bad performance in Costing Background with all adjustments
- Add M_TRANSACTION_TRXPROCDATE index same as M_TRANSACTION_MOVEMENTDATE
- Modify M_TRANSACTION_CALCULATED index, by adding movementdate column in order to improve CostingUtils.getMaxTransactionDate query.
- Add new M_LASTTRX table to store last transaction movementdate and improve CostAdjustmentUtils.isNeededBackdatedCostAdjustment query.
---
M src-db/database/model/tables/M_TRANSACTION.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_TABLE.xml
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingServer.java
A src-db/database/model/tables/M_LASTTRX.xml
---
|
|
|
(0091148)
|
hgbot
|
2016-11-03 21:08
|
|
Repository: erp/backports/3.0PR16Q3.3
Changeset: 6cbddc71d1342adaa6e764e211788ba9aaec473a
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 27 12:38:06 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q3.3/rev/6cbddc71d1342adaa6e764e211788ba9aaec473a [^]
Related to issue 33994: Code review improvements
- Remove unnecessary M_LASTTRX_PRODUCT_IDX and M_LASTTRX_WAREHOUSE_IDX indexes and create M_LASTTRX_PRODUCT_ORG_WH index with m_product_id, ad_org_id and m_warehouse_id columns.
- Remove unnecessary M_TRX_CALCULATED_MOVEMENTDATE and M_TRX_CALCULATED_PRODUCT_DATES indexes.
- Remove unneeded parameters in CostingServer.updateLastTransaction method, and make it private and non static.
- Remove unnecessary flush() after calling to updateLastTransaction, as flush() is already done in finally statement.
- Move getLastTransaction method from CostingServer to CostAdjustmentUtils class.
- Remove unneeded startingDate parameter in CostAdjustmentUtils.getLastTransaction method.
- Merge isBeforeLastTransaction and isAfterLastTransaction methods into CostAdjustmentUtils.compareToLastTransaction new method.
---
M src-db/database/model/tables/M_LASTTRX.xml
M src-db/database/model/tables/M_TRANSACTION.xml
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingServer.java
---
|
|
|
(0091149)
|
hgbot
|
2016-11-03 21:08
|
|
Repository: erp/backports/3.0PR16Q3.3
Changeset: 0016c52766bf8f66379652dff9b2dd8b51c6b386
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 27 19:29:56 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q3.3/rev/0016c52766bf8f66379652dff9b2dd8b51c6b386 [^]
Related to issue 33994: Rename table from M_LASTTRX to M_TRANSACTION_LAST
Rename table from M_LASTTRX to M_TRANSACTION_LAST and remove unneeded movementdate, trxprocessdate, movementtype and qty columns.
---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_TABLE.xml
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingServer.java
A src-db/database/model/tables/M_TRANSACTION_LAST.xml
R src-db/database/model/tables/M_LASTTRX.xml
---
|
|
|
(0091150)
|
hgbot
|
2016-11-03 21:08
|
|
Repository: erp/backports/3.0PR16Q3.3
Changeset: c0602d9ffaad869c0441b60245cddde4e7d85d48
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Oct 11 18:50:35 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q3.3/rev/c0602d9ffaad869c0441b60245cddde4e7d85d48 [^]
Related to issue 33994: Run Synchronize Terminology
---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingServer.java
---
|
|
|
(0091151)
|
hgbot
|
2016-11-03 21:08
|
|
Repository: erp/backports/3.0PR16Q3.3
Changeset: 34ed1ac21390fe3f0eb1a58fd46d64f0c8bfdd00
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 27 19:34:57 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q3.3/rev/34ed1ac21390fe3f0eb1a58fd46d64f0c8bfdd00 [^]
Related to issue 33994: Delete TransactionLast when validating new Costing Rule
Delete M_Transaction_Last when validating a new Costing Rule and exists a previous rule.
---
M src/org/openbravo/costing/CostingRuleProcess.java
---
|
|
|
(0091152)
|
hgbot
|
2016-11-03 21:08
|
|
Repository: erp/backports/3.0PR16Q3.3
Changeset: 1aefec4714154d8b6d03ed44897b620170a48cdb
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Nov 03 13:57:43 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR16Q3.3/rev/1aefec4714154d8b6d03ed44897b620170a48cdb [^]
Related to issue 33994: Initialize TransactionLast table
In case TransactionLast has not been initialized yet, it will be done by CostAdjustmentUtils.insertLastTransaction method when calling CostAdjustmentUtils.isNeededBackdatedCostAdjustment.
---
M src/org/openbravo/costing/CostAdjustmentUtils.java
---
|
|
|
(0091176)
|
hgbot
|
2016-11-04 15:06
|
|
|
|
|
|