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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0016117
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] I. Performancemajoralways2011-02-07 12:052011-03-28 16:22
ReporterjonalegriaesarteView Statuspublic 
Assigned Tomirurita 
PriorityurgentResolutionfixedFixed in Version2.50MP28
StatusclosedFix in branch2.50Fixed in SCM revision3c02be0f1ebf
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50MP26SCM revision 
Review Assigned To
Web browser
ModulesAdvanced Payables and Receivables Mngmt
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0016117: Performace problem when launching update.database -Dforce=true due to the module script

DescriptionThere is a performance problem when launching update.database -Dforce=true due to the APRM's module script.

Steps To ReproduceThe problem appears when you define a big number of organizations (400 in this case) and you open periods to each organization (the problem appears when you open 5 periods to 5 organizations). The problem is in the insertPeriod method in file modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration_data.xsql, because this method is trying to insert a big amount of data, and the select to obtain the data takes much time.
Proposed SolutionWe think that the insert could be changed as follows:

INSERT INTO c_periodcontrol(
                c_periodcontrol_id, ad_client_id, ad_org_id, isactive,
     created,
                createdby, updated, updatedby, c_period_id, docbasetype,
     periodstatus,
                periodaction, processing)
     select c_period.ad_client_id as ad_client_id, a.ad_org_id, 'Y',
     now(),
          '100', now(), '100', c_period.c_period_id, ad_ref_list.value
          , 'C' as status
          ,'N', 'N'
     from c_period
     , c_year,
     (select ad_org_id from ad_org where isperiodcontrolallowed = 'Y') a,
     ad_ref_list
     where c_period.c_year_id = c_year.c_year_id
     and c_year.c_calendar_id in (select c_calendar_id from ad_org
                where ad_org_id = ad_org_getcalendarowner(a.ad_org_id))
     and ad_ref_list.isactive='Y'
     and ad_ref_list.ad_reference_id = '183'
     and not exists (select 1
                from c_periodcontrol
                where c_periodcontrol.c_period_id = c_period.c_period_id
                and c_periodcontrol.docbasetype = ad_ref_list.value
                and c_periodcontrol.ad_org_id = a.ad_org_id)
     group by c_period.c_period_id, c_period.ad_client_id,
     ad_ref_list.value,
     a.ad_org_id
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0015871 closedmirurita Performace problem when launching update.database -Dforce=true due to the module script 

-  Notes
(0034596)
hgbot (developer)
2011-03-07 10:23

Repository: erp/pmods/org.openbravo.advpaymentmngt
Changeset: 946b79cfd103f25a204c6a6cd29ac93980cf2b91
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Mon Mar 07 10:22:21 2011 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/rev/946b79cfd103f25a204c6a6cd29ac93980cf2b91 [^]

Fixes issue 16117: improve performace modulescript CreateAccountingConfiguration

---
M build/classes/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfigurationData.class
M src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration_data.xsql
M src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfigurationData.java
---
(0034597)
hgbot (developer)
2011-03-07 10:26

Repository: erp/stable/2.50
Changeset: 3c02be0f1ebf301b8ccd7bed6da07c097538ff09
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Mon Mar 07 10:25:41 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/3c02be0f1ebf301b8ccd7bed6da07c097538ff09 [^]

Fixed issue 16117: add index to c_periodcontrol

---
M src-db/database/model/tables/C_PERIODCONTROL.xml
---
(0035275)
jonalegriaesarte (reporter)
2011-03-28 16:22

Verified

- Issue History
Date Modified Username Field Change
2011-03-03 11:44 mirurita Type defect => backport
2011-03-03 11:44 mirurita fix_in_branch => 2.50
2011-03-07 10:23 hgbot Checkin
2011-03-07 10:23 hgbot Note Added: 0034596
2011-03-07 10:23 hgbot Status scheduled => resolved
2011-03-07 10:23 hgbot Resolution open => fixed
2011-03-07 10:23 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/rev/946b79cfd103f25a204c6a6cd29ac93980cf2b91 [^]
2011-03-07 10:26 hgbot Checkin
2011-03-07 10:26 hgbot Note Added: 0034597
2011-03-07 10:26 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/rev/946b79cfd103f25a204c6a6cd29ac93980cf2b91 [^] => http://code.openbravo.com/erp/stable/2.50/rev/3c02be0f1ebf301b8ccd7bed6da07c097538ff09 [^]
2011-03-28 16:22 jonalegriaesarte Note Added: 0035275
2011-03-28 16:22 jonalegriaesarte Status resolved => closed
2011-03-28 16:22 jonalegriaesarte Fixed in Version => 2.50MP28


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker