Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0025361 | Openbravo ERP | A. Platform | public | 2013-12-18 08:36 | 2013-12-22 05:46 |
|
Reporter | alostale | |
Assigned To | alostale | |
Priority | normal | Severity | trivial | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0MP31 | |
Merge Request Status | |
Review Assigned To | shankarb |
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 | 0025361: Unneeded queries when filtering |
Description | Whenever a filter on a foreign key is applied in a grid AD is queried to determine whether the identifier is composed by one or more columns.
This results in DB 3 queries (one to get column, one to get table and another one to get all columns in table) and in a loop over all columns in table.
Note these queries are repeated for each FK field that is used in the filter. |
Steps To Reproduce | -Enable HQL SQL loggging
-Go to (for example) Product window
-Filter by organization
Check log, these queries are present:
select ... from AD_Table ...
select ... from AD_Column ...
select ... from AD_Column ... |
Proposed Solution | Use in memory model instead of querying DB |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0020643 | | closed | guilleaer | fillters columns does not work when there are records with the character "-" | related to | defect | 0036421 | | closed | alostale | Financial Account records are not filtered by name if the filter contains "-" |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2013-12-18 08:36 | alostale | New Issue | |
2013-12-18 08:36 | alostale | Assigned To | => AugustoMauch |
2013-12-18 08:36 | alostale | Modules | => Core |
2013-12-18 08:36 | alostale | Triggers an Emergency Pack | => No |
2013-12-18 08:36 | alostale | Assigned To | AugustoMauch => alostale |
2013-12-18 08:36 | alostale | Tag Attached: Performance | |
2013-12-18 08:37 | alostale | Description Updated | bug_revision_view_page.php?rev_id=5261#r5261 |
2013-12-18 08:38 | alostale | Relationship added | related to 0020643 |
2013-12-18 08:41 | hgbot | Checkin | |
2013-12-18 08:41 | hgbot | Note Added: 0062756 | |
2013-12-18 08:41 | hgbot | Status | new => resolved |
2013-12-18 08:41 | hgbot | Resolution | open => fixed |
2013-12-18 08:41 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/936ce44b74bd99462d5ffd2f7e35b376393e86de [^] |
2013-12-18 08:43 | alostale | Note Added: 0062757 | |
2013-12-19 12:32 | hudsonbot | Checkin | |
2013-12-19 12:32 | hudsonbot | Note Added: 0062862 | |
2013-12-20 07:42 | alostale | Review Assigned To | => shankarb |
2013-12-22 05:46 | shankarb | Note Added: 0063043 | |
2013-12-22 05:46 | shankarb | Status | resolved => closed |
2013-12-22 05:46 | shankarb | Fixed in Version | => 3.0MP31 |
2017-07-05 18:02 | caristu | Relationship added | related to 0036421 |
Notes |
|
(0062756)
|
hgbot
|
2013-12-18 08:41
|
|
Repository: erp/devel/pi
Changeset: 936ce44b74bd99462d5ffd2f7e35b376393e86de
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Dec 18 08:41:31 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/936ce44b74bd99462d5ffd2f7e35b376393e86de [^]
fixed bug 25361: unneeded queries when filtering
using in memory model instead of reading identifier info from AD
---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
|
|
|
|
Performance improvement after the fix:
* For each FK field that participates in the filter:
- Prevent 3 DB queries
- Prevent loop on columns
- Total time: 10-15ms for each field |
|
|
|
|
|
(0063043)
|
shankarb
|
2013-12-22 05:46
|
|
Code reviewed and tested in pi changeset a0194e74f446 |
|