Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029173Openbravo ERPA. Platformpublic2015-03-06 14:032015-09-25 14:03
caristu 
egoitz 
immediatemajoralways
closedno change required 
5
3.0PR15Q1.1 
3.0PR15Q4 
egoitz
Core
No
0029173: Performance problem when filtering in Return to Vendor pick and execute lines having a big amount of data
Performance problem in Return to Vendor pick and execute lines in an environment with big amount of data.

1) Go to the Return to Vendor window
2) Click on the Pick/Edit lines button
3) Filter by product, doing the following
   3.1) Type a string
   3.2) Click on the enter button of the kwyboard
4) Notice that postgres CPU usage increases until reaching the 100%

Attached the HQL query that is causing the performance problem
Contact CAR for an environment where the problem is reproducible.
Performance
related to defect 0029212 closed AugustoMauch can't filter multiple products in return from/to P&Es 
related to defect 0029216 closed alostale can't prevent filtering FK by identifier from Grid Configuration 
txt hqlQuery.txt (6,012) 2015-03-06 14:41
https://issues.openbravo.com/file_download.php?file_id=7865&type=bug
Issue History
2015-03-06 14:03caristuNew Issue
2015-03-06 14:03caristuAssigned To => AugustoMauch
2015-03-06 14:03caristuModules => Core
2015-03-06 14:03caristuTriggers an Emergency Pack => No
2015-03-06 14:04caristuNote Added: 0075248
2015-03-06 14:04caristuIssue Monitored: networkb
2015-03-06 14:04caristuNote Edited: 0075248bug_revision_view_page.php?bugnote_id=0075248#r7878
2015-03-06 14:41caristuFile Added: hqlQuery.txt
2015-03-06 14:41caristuDescription Updatedbug_revision_view_page.php?rev_id=7880#r7880
2015-03-06 14:41caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7882#r7882
2015-03-09 12:10jonalegriaesarteResolution time => 1426374000
2015-03-09 18:54AugustoMauchAssigned ToAugustoMauch => alostale
2015-03-09 18:54AugustoMauchStatusnew => scheduled
2015-03-10 09:52alostaleTag Attached: Performance
2015-03-10 10:18alostaleRelationship addedrelated to 0029212
2015-03-10 12:21alostaleRelationship addedrelated to 0029216
2015-03-10 14:34alostaleNote Added: 0075394
2015-03-10 14:40alostaleNote Added: 0075395
2015-03-10 14:42alostaleNote Added: 0075396
2015-03-10 14:42alostaleAssigned Toalostale => caristu
2015-03-10 14:42alostaleStatusscheduled => feedback
2015-03-30 13:59jonalegriaesarteTarget Version3.0PR15Q2 => 3.0PR15Q3
2015-05-25 09:55dmitry_mezentsevNote Added: 0077676
2015-06-12 12:41caristuAssigned Tocaristu => egoitz
2015-06-12 12:44caristuNote Added: 0078233
2015-06-29 12:45egoitzTarget Version3.0PR15Q3 => 3.0PR15Q4
2015-08-21 11:20dmitry_mezentsevNote Added: 0079567
2015-09-25 14:03dmitry_mezentsevReview Assigned To => egoitz
2015-09-25 14:03dmitry_mezentsevNote Added: 0080640
2015-09-25 14:03dmitry_mezentsevStatusfeedback => closed
2015-09-25 14:03dmitry_mezentsevResolutionopen => no change required

Notes
(0075248)
caristu   
2015-03-06 14:04   
To be decided if it is a platform issue, or a functional one in case the problem could be in the HQL query used for populating the data of the pick and edit

(0075394)
alostale   
2015-03-10 14:34   
Number of rows per table in the instance provided by CAR:

m_productprice 255138
m_transaction 151498
m_transaction_cost 151496
m_costing 69307
c_orderlinetax 66413
c_invoicelinetax 62059
m_inoutline 61710
c_orderline 61665
fin_payment_schedule 60542
c_orderline_offer 59782
c_invoiceline 57776
m_storage_detail 57486
c_invoiceline_offer 55465
m_product 42666
m_stock_proposed 39547
m_movementline 36470
c_ordertax 33025
c_invoicetax 32955
fin_payment_scheduledetail 32603
m_inout 31236
fin_payment_detail 30649
c_order 30544
c_invoice 30325
(0075395)
alostale   
2015-03-10 14:40   
Regardless of improving the query, filtering iContains for product identifier can't perform well.

Proposal:
* update to PR15Q2.1 (tested that upgrade and it went smoothly) where issues 0029212 and 0029216 are fixed
* In Grid Configuration
  - Add restriction in "Product - Pick / Edit Lines - RFC/RTV HQL Pick / Edit Lines" field to "Allow filtering by FK identifier" No

In this way it will be only possible to filter products by selecting them in the filter drop down list, making it work reasonably fast (~700ms per request).
(0075396)
alostale   
2015-03-10 14:42   
Check if proposed workaround solves the problem. If so, I'd propose to move this issue to Functional team setting it as design defect (it might require, if possible, major refactors in the query).
(0077676)
dmitry_mezentsev   
2015-05-25 09:55   
Hi Guys,

Any update here as it is now more than 2 months without any action.
Thanks.
(0078233)
caristu   
2015-06-12 12:44   
Waiting for customer response to confirm if the proposed workaround solves the problem.
(0079567)
dmitry_mezentsev   
2015-08-21 11:20   
Ping.
IMHO we need to close it. 3 months without feedback.
(0080640)
dmitry_mezentsev   
2015-09-25 14:03   
Proposed solution is provided but there is no feedback for too long.