Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039171Openbravo ERP09. Financial managementpublic2018-08-22 14:592018-09-12 21:33
malsasua 
Sandrahuguet 
normalmajoralways
closedfixed 
5
 
 
markmm82
Core
No
0039171: Reset Accounting: performance problem executing unpost functionality with big database
With a big database:
. # m_inventory > 60K
. # m_inventoryline > 2M
. # factact > 30M

it takes more than 5 minutes to unpost the table m_inventory, only for one day.

For several days, timeout happens
Reset Accounting window
. select M_Inventory table
. date range one week
. delete existing accounting entries selected

Operation Timed out error is returned
Performance
related to defect 00402083.0PR18Q3.3 closed AtulOpenbravo Unpost process can be very slow 
Issue History
2018-08-22 14:59malsasuaNew Issue
2018-08-22 14:59malsasuaAssigned To => Triage Finance
2018-08-22 14:59malsasuaModules => Core
2018-08-22 14:59malsasuaResolution time => 1536876000
2018-08-22 14:59malsasuaTriggers an Emergency Pack => No
2018-08-22 15:37malsasuaDescription Updatedbug_revision_view_page.php?rev_id=17558#r17558
2018-08-22 15:38malsasuaTag Attached: Performance
2018-08-23 08:48aferrazAssigned ToTriage Finance => AtulOpenbravo
2018-08-24 11:30ngarciaSummaryPerformance problem executing unpost functionality with big database => Reset Accounting: performance problem executing unpost functionality with big database
2018-08-24 11:30ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17564#r17564
2018-08-24 11:31ngarciaIssue Monitored: ngarcia
2018-08-27 17:19rafarodaIssue Monitored: rafaroda
2018-08-28 10:30AtulOpenbravoStatusnew => scheduled
2018-09-10 11:08SandrahuguetNote Added: 0106652
2018-09-10 12:11SandrahuguetAssigned ToAtulOpenbravo => Sandrahuguet
2018-09-11 11:16SandrahuguetNote Added: 0106681
2018-09-11 11:16SandrahuguetReview Assigned To => markmm82
2018-09-12 16:53hgbotCheckin
2018-09-12 16:53hgbotNote Added: 0106714
2018-09-12 16:53hgbotStatusscheduled => resolved
2018-09-12 16:53hgbotResolutionopen => fixed
2018-09-12 16:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6bac4a0d28462693b61fb6ba48955bfa61e53861 [^]
2018-09-12 16:56SandrahuguetNote Added: 0106715
2018-09-12 17:09markmm82Note Added: 0106718
2018-09-12 17:10markmm82Statusresolved => closed
2018-09-12 21:33hudsonbotCheckin
2018-09-12 21:33hudsonbotNote Added: 0106737
2019-02-14 16:10joniturralde93Relationship addedrelated to 0040208

Notes
(0106652)
Sandrahuguet   
2018-09-10 11:08   
With the proposed fix:
 *Unpost the table m_inventory for the last two months takes 50s
(0106681)
Sandrahuguet   
2018-09-11 11:16   
Reset Accounting window
. select M_Inventory table
. date range two months
. delete existing accounting entries selected

Takes 50s in client enviroment
(0106714)
hgbot   
2018-09-12 16:53   
Repository: erp/devel/pi
Changeset: 6bac4a0d28462693b61fb6ba48955bfa61e53861
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Sep 04 15:23:34 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6bac4a0d28462693b61fb6ba48955bfa61e53861 [^]

Fixes issue 39171 improve reset accounting process performance

Improve performance of getTables and getDocbasetypes queries

---
M src-db/database/model/tables/FACT_ACCT.xml
M src/org/openbravo/financial/ResetAccounting.java
---
(0106715)
Sandrahuguet   
2018-09-12 16:56   
Repository: erp/devel/pi
Changeset: 6bac4a0d28462693b61fb6ba48955bfa61e53861
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Sep 04 15:23:34 2018 +0200
URL: https://code.openbravo.com/erp/devel/pi/rev/7671c9b22d7e [^]

Related to 39171: Use ad_periodcontrolallowed_org_id column instead of calling
ad_org_getperiodcontrolallow() function to improve performance.

The ad_org_getperiodcontrolallow column of each organization stores it period
control allowed organization. Using it is more efficient than invoke the ad_org_getperiodcontrolallow()
function as this one is recursive and implies extra queries that are unnecesaries
as the information is in the requested organizations.
---
M src/org/openbravo/financial/ResetAccounting.java
---
(0106718)
markmm82   
2018-09-12 17:09   
Code review + Testing OK
(0106737)
hudsonbot   
2018-09-12 21:33   
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/ad75d3cb1744 [^]
Maturity status: Test