Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||||||||||||||||
View Issue Details | ||||||||||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||||||||||||||||
0028479 | Openbravo ERP | A. Platform | public | 2014-12-23 16:07 | 2018-01-03 12:38 | |||||||||||||||||||||
Reporter | alostale | |||||||||||||||||||||||||
Assigned To | alostale | |||||||||||||||||||||||||
Priority | high | Severity | minor | Reproducibility | have not tried | |||||||||||||||||||||
Status | closed | Resolution | fixed | |||||||||||||||||||||||
Platform | OS | 5 | OS Version | |||||||||||||||||||||||
Product Version | ||||||||||||||||||||||||||
Target Version | Fixed in Version | 3.0PR18Q1 | ||||||||||||||||||||||||
Merge Request Status | ||||||||||||||||||||||||||
Review Assigned To | caristu | |||||||||||||||||||||||||
OBNetwork customer | ||||||||||||||||||||||||||
Web browser | ||||||||||||||||||||||||||
Modules | Core | |||||||||||||||||||||||||
Support ticket | ||||||||||||||||||||||||||
Regression level | ||||||||||||||||||||||||||
Regression date | ||||||||||||||||||||||||||
Regression introduced in release | ||||||||||||||||||||||||||
Regression introduced by commit | ||||||||||||||||||||||||||
Triggers an Emergency Pack | No | |||||||||||||||||||||||||
Summary | 0028479: unneeded queries to ad_langue table | |||||||||||||||||||||||||
Description | Whenever a new DAL object instance of any entity that has a reference to AD_Language is created, a query to AD_Language table is executed. This is caused because: 1. Hibernate eagerly initializes many-to-one references that are linked not by primary key but by unique constraint. 2. After this eager initialization the object is not included in 1st level cache. This is noticeable, for example, when standard views are generated in an instance with translations installed, ad_langue table is unnecessarily queried. The problem is caused while initializing proxies for trl lists (ie. fld.getADFieldTrlList()). Translation relationship is based not on FK but on unique constraint, due to some issue in Hibernate these relationships are not proxied nor cached, resulting on being queried whenever the object is initialized. In a customer with translations installed, it's been measured queries to AD_Language to be ~ 8% of the total number of executed queries. | |||||||||||||||||||||||||
Steps To Reproduce | 1. Install Spanish translation 2. Set all modules in development so view is always computed 3. Set pg to log all queries 4. Open BP window -> Check there are 8500 queries to ad_language (all of them retrieving the same record) | |||||||||||||||||||||||||
Proposed Solution | Backport HHH-11703 [1] Hibernate issue that adds objects initialized by a unique contraint to 1st level cache. In this way, only one query per different language is executed per request (which typically is just one) instead one per record initialized. --- [1] https://hibernate.atlassian.net/browse/HHH-11703 [^] | |||||||||||||||||||||||||
Additional Information | ||||||||||||||||||||||||||
Tags | Performance | |||||||||||||||||||||||||
Relationships |
| |||||||||||||||||||||||||
Attached Files | ||||||||||||||||||||||||||
Issue History | ||||||||||||||||||||||||||
Date Modified | Username | Field | Change | |||||||||||||||||||||||
2014-12-23 16:07 | alostale | New Issue | ||||||||||||||||||||||||
2014-12-23 16:07 | alostale | Assigned To | => AugustoMauch | |||||||||||||||||||||||
2014-12-23 16:07 | alostale | Modules | => Core | |||||||||||||||||||||||
2014-12-23 16:07 | alostale | Triggers an Emergency Pack | => No | |||||||||||||||||||||||
2014-12-23 16:09 | alostale | Tag Attached: per | ||||||||||||||||||||||||
2014-12-23 16:09 | alostale | Tag Detached: per | ||||||||||||||||||||||||
2014-12-23 16:09 | alostale | Tag Attached: Performance | ||||||||||||||||||||||||
2014-12-23 16:10 | alostale | Relationship added | related to 0028477 | |||||||||||||||||||||||
2015-01-07 16:06 | shuehner | Issue Monitored: shuehner | ||||||||||||||||||||||||
2015-03-06 14:45 | alostale | Priority | normal => urgent | |||||||||||||||||||||||
2015-03-06 14:45 | alostale | Status | new => scheduled | |||||||||||||||||||||||
2015-03-06 14:46 | alostale | Status | scheduled => acknowledged | |||||||||||||||||||||||
2015-03-11 08:10 | alostale | Target Version | 3.0PR15Q2 => | |||||||||||||||||||||||
2015-03-17 14:37 | alostale | Assigned To | AugustoMauch => platform | |||||||||||||||||||||||
2015-11-11 11:37 | alostale | Priority | urgent => normal | |||||||||||||||||||||||
2015-11-11 12:42 | alostale | Priority | normal => high | |||||||||||||||||||||||
2016-12-01 13:24 | alostale | Priority | high => normal | |||||||||||||||||||||||
2016-12-01 14:03 | alostale | Priority | normal => high | |||||||||||||||||||||||
2017-10-10 16:03 | alostale | Note Added: 0099855 | ||||||||||||||||||||||||
2017-10-13 12:02 | alostale | Relationship added | related to 0020742 | |||||||||||||||||||||||
2017-10-13 12:13 | alostale | Review Assigned To | => caristu | |||||||||||||||||||||||
2017-10-13 12:13 | alostale | Summary | view generation: unneeded queries to ad_langue table => unneeded queries to ad_langue table | |||||||||||||||||||||||
2017-10-13 12:13 | alostale | Description Updated | bug_revision_view_page.php?rev_id=16070#r16070 | |||||||||||||||||||||||
2017-10-13 12:13 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=16072#r16072 | |||||||||||||||||||||||
2017-10-13 12:13 | alostale | Proposed Solution updated | ||||||||||||||||||||||||
2017-10-13 12:13 | alostale | Description Updated | bug_revision_view_page.php?rev_id=16073#r16073 | |||||||||||||||||||||||
2017-10-13 12:19 | hgbot | Checkin | ||||||||||||||||||||||||
2017-10-13 12:19 | hgbot | Note Added: 0099901 | ||||||||||||||||||||||||
2017-10-13 12:19 | hgbot | Status | acknowledged => resolved | |||||||||||||||||||||||
2017-10-13 12:19 | hgbot | Resolution | open => fixed | |||||||||||||||||||||||
2017-10-13 12:19 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/3dcf5dc6325f829eef34ffb86a1832aad5502b14 [^] | |||||||||||||||||||||||
2017-10-13 12:36 | alostale | Assigned To | platform => alostale | |||||||||||||||||||||||
2017-10-13 12:38 | alostale | Relationship added | related to 0037064 | |||||||||||||||||||||||
2017-10-20 15:31 | caristu | Note Added: 0099979 | ||||||||||||||||||||||||
2017-10-20 15:31 | caristu | Status | resolved => closed | |||||||||||||||||||||||
2017-10-20 15:31 | caristu | Fixed in Version | => 3.0PR18Q1 | |||||||||||||||||||||||
2018-01-03 12:38 | hudsonbot | Checkin | ||||||||||||||||||||||||
2018-01-03 12:38 | hudsonbot | Note Added: 0101329 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|