Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
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
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

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.
Attached Filespatch file icon userWindow.patch [^] (1,092 bytes) 2020-06-04 11:06 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

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

Merge Request: [^]
hgbot (developer)
2020-06-16 08:14

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

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

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 Resolution time => 1592431200
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 => [^]
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