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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033843
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2016-08-29 16:532016-09-02 14:28
ReporteralostaleView Statuspublic 
Assigned ToNaroaIriarte 
PriorityurgentResolutionfixedFixed in Version3.0PR16Q4
StatusclosedFix in branchFixed in SCM revision6b95b859ada6
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033843: useless heavy queries in linked items

DescriptionWhen linked items section is opened a set of useless and potentially heavy queries is executed.
Steps To Reproduce-Open Business Partner window and select any row
-Open Linked Items section and check PG queries:
        SELECT C_Bpartner_ID as ID FROM ContMng_Container WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM contmng_container_history WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM ContMng_WorkOrder WHERE C_Bpartner_ID = ?
        SELECT Container_Owner as ID FROM ContMng_WorkOrder WHERE Container_Owner = ?
        SELECT Carriername as ID FROM ContMng_Content WHERE Carriername = ?
        SELECT C_Bpartner_ID as ID FROM ContMng_WorkOrder WHERE C_Bpartner_ID = ?
        SELECT Container_Owner as ID FROM ContMng_WorkOrder WHERE Container_Owner = ?
        SELECT C_BPartner_ID as ID FROM Fact_Acct WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM C_ValidCombination WHERE C_BPartner_ID = ?
        SELECT SalesRep_ID as ID FROM C_BPartner WHERE SalesRep_ID = ?
        SELECT C_BPartner_ID as ID FROM M_Product WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM C_Project WHERE C_BPartner_ID = ?
        SELECT Responsible_ID as ID FROM C_Project WHERE Responsible_ID = ?
        SELECT C_BPartner_ID as ID FROM C_AcctSchema_Element WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM C_BudgetLine WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM Fact_Acct WHERE C_BPartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM GL_Journal WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM GL_JournalLine WHERE C_Bpartner_ID = ?
        SELECT C_BPartner_ID as ID FROM Fact_Acct WHERE C_BPartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM GL_Journal WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM GL_JournalLine WHERE C_Bpartner_ID = ?
        SELECT C_BPartner_ID as ID FROM Fact_Acct WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM A_Asset WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM Fact_Acct WHERE C_BPartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_Doubtful_Debt WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_Doubtful_Debt WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_Doubtful_Debt_Run WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_Financial_Account WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM APRM_Finacc_Trx_Full_Acct_V WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM APRM_FinAcc_Transaction_acct_v WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_BankStatementLine WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_Finacc_Transaction WHERE C_Bpartner_ID = ?
        SELECT C_BPartner_ID as ID FROM Fact_Acct WHERE C_BPartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_Payment WHERE C_Bpartner_ID = ?
        SELECT C_BPartner_ID as ID FROM Fact_Acct WHERE C_BPartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_Payment WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_Payment_Proposal WHERE C_Bpartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM FIN_Payment_Prop_Detail_V WHERE C_Bpartner_ID = ?
        SELECT C_BPartner_ID as ID FROM C_TaxPayment WHERE C_BPartner_ID = ?
        SELECT C_BPartnerCashTrx_ID as ID FROM AD_ClientInfo WHERE C_BPartnerCashTrx_ID = ?
        SELECT C_BPartner_ID as ID FROM AD_OrgInfo WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM AD_User WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM C_BP_BankAccount WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM C_BPartner_Discount WHERE C_BPartner_ID = ?
        SELECT SalesRep_ID as ID FROM C_BPartner WHERE SalesRep_ID = ?
        SELECT C_BPartner_ID as ID FROM AD_User WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM C_BP_SALCATEGORY WHERE C_BPartner_ID = ?
        SELECT SalesRep_ID as ID FROM C_BPartner WHERE SalesRep_ID = ?
        SELECT C_BPartner_ID as ID FROM C_BP_Customer_Acct WHERE C_BPartner_ID = ?
        SELECT SalesRep_ID as ID FROM C_BPartner WHERE SalesRep_ID = ?
        SELECT C_BPartner_ID as ID FROM C_BP_Employee_Acct WHERE C_BPartner_ID = ?
        SELECT C_BPartner_ID as ID FROM C_BPartner_Location WHERE C_BPartner_ID = ?
        SELECT C_Bpartner_ID as ID FROM SUPTEST_Salary WHERE C_Bpartner_ID = ?
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 00335653.0PR17Q1 closedcaristu ability to disable linked items section 

-  Notes
(0089588)
NaroaIriarte (developer)
2016-08-31 10:59

The query done by the selectKeyValue sql method of UsedByLing_data.xsql was not necessary because it is only retrieving the id which is the same id that we have or null,if it does not exist, only to use those ids in the countLinks sql method. It is the same not to do the selectKeyValue query and pass as an argument to the countLinks the id we have than passing the ids or null values retrieved from the selectKeyValue sql method, and as this method executes potentially heavy queries, it has been deleted.
(0089668)
hgbot (developer)
2016-09-01 15:15

Repository: erp/devel/pi
Changeset: 6b95b859ada6e23b64744325292b9b431d636361
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Aug 31 10:57:20 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6b95b859ada6e23b64744325292b9b431d636361 [^]

Fixed issue 33843: There where some useless queries in linked items

The sql method selectKeyValue was doing some useless queries and, as they were useless and potentialy heavy, the code which was invoking the method and the method itself have been deleted.

---
M src/org/openbravo/erpCommon/utility/UsedByLink.java
M src/org/openbravo/erpCommon/utility/UsedByLink_data.xsql
---
(0089700)
alostale (developer)
2016-09-02 13:23

code reviewed

tested: those queries are not executed anymore linked items continues working in the same manner it did before
(0089706)
hudsonbot (developer)
2016-09-02 14:28

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

- Issue History
Date Modified Username Field Change
2016-08-29 16:53 alostale New Issue
2016-08-29 16:53 alostale Assigned To => platform
2016-08-29 16:53 alostale Modules => Core
2016-08-29 16:53 alostale Triggers an Emergency Pack => No
2016-08-29 17:03 alostale Relationship added related to 0033565
2016-08-29 17:03 alostale Tag Attached: Performance
2016-08-29 17:03 alostale Status new => scheduled
2016-08-29 17:03 alostale Assigned To platform => NaroaIriarte
2016-08-31 10:38 NaroaIriarte Review Assigned To => alostale
2016-08-31 10:39 NaroaIriarte Issue Monitored: NaroaIriarte
2016-08-31 10:39 NaroaIriarte Issue End Monitor: NaroaIriarte
2016-08-31 10:59 NaroaIriarte Note Added: 0089588
2016-09-01 15:15 hgbot Checkin
2016-09-01 15:15 hgbot Note Added: 0089668
2016-09-01 15:15 hgbot Status scheduled => resolved
2016-09-01 15:15 hgbot Resolution open => fixed
2016-09-01 15:15 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6b95b859ada6e23b64744325292b9b431d636361 [^]
2016-09-02 13:23 alostale Note Added: 0089700
2016-09-02 13:23 alostale Status resolved => closed
2016-09-02 13:23 alostale Fixed in Version => 3.0PR16Q4
2016-09-02 14:28 hudsonbot Checkin
2016-09-02 14:28 hudsonbot Note Added: 0089706


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker