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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0044281
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2020-06-04 11:062020-07-07 20:18
ReporterALopeteguiView Statuspublic 
Assigned Tocberner 
PriorityhighResolutionfixedFixed in VersionPR20Q3
StatusclosedFix in branchFixed in SCM revision462fb40027b9
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0044281: user window have bad performance because of HQL filter clause

DescriptionThe Window User have different query in the Filter clause and in the HQL filter clause.
The SQL clause check if the user is an employee or salesrepresentative doing a exists with c_bpartner window and joining with the c_bpart_ner_id of ad_user.

The HQL filter instead, makes the check with an "IN" and without joining c_bpartner_id of ad_user.

SQL query have a good performance, HQL query not.
Steps To ReproduceIn a high volume instance, open the window "user" and search a user filtering by any value.
Proposed SolutionChange the HQL query to have the same query as SQL clause

Attached diff file.
TagsPerformance
Attached Filespatch file icon userWindow.patch [^] (1,092 bytes) 2020-06-04 11:06 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0120822)
cberner (developer)
2020-06-12 11:22

Merge Request: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/83 [^]
(0120854)
hgbot (developer)
2020-06-16 08:14

Repository: erp/devel/pi
Changeset: 462fb40027b9cc3ce723cfba74f3a95d51cf3c9e
Author: Cristian Berner <cristian.berner <at> openbravo.com>
Date: Fri Jun 12 11:17:35 2020 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/462fb40027b9cc3ce723cfba74f3a95d51cf3c9e [^]

Fixes ISSUE-44281: Use exists in hql filter clause of User window

HQL filter clause of User Window was previously using IN to filter from
BusinessPartner table, this resulted in a big hit in performance on
instances with a large number of BussinessPartners.

This has been fixed by using an exists and joining the table
BusinessPartner on the id being checked. It is similar to the SQL Filter
clause.

---
M src-db/database/sourcedata/AD_TAB.xml
---

- Issue History
Date Modified Username Field Change
2020-06-04 11:06 ALopetegui New Issue
2020-06-04 11:06 ALopetegui Assigned To => platform
2020-06-04 11:06 ALopetegui File Added: userWindow.patch
2020-06-04 11:06 ALopetegui Modules => Core
2020-06-04 11:06 ALopetegui Triggers an Emergency Pack => No
2020-06-04 11:06 ALopetegui Tag Attached: Performance
2020-06-12 11:22 cberner Note Added: 0120822
2020-06-12 11:22 cberner Assigned To platform => cberner
2020-06-12 11:22 cberner Status new => scheduled
2020-06-16 08:14 hgbot Checkin
2020-06-16 08:14 hgbot Note Added: 0120854
2020-06-16 08:14 hgbot Status scheduled => resolved
2020-06-16 08:14 hgbot Resolution open => fixed
2020-06-16 08:14 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/462fb40027b9cc3ce723cfba74f3a95d51cf3c9e [^]
2020-06-16 08:16 cberner Review Assigned To => alostale
2020-06-19 07:12 alostale Status resolved => closed
2020-06-19 07:12 alostale Fixed in Version => 3.0PR20Q3
2020-07-07 20:18 eugeni Issue Monitored: eugeni


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker