Openbravo Issue Tracking System - POS2
View Issue Details
0056806POS2POSpublic2024-10-16 14:312024-11-16 06:33
fermin_ostivar 
sreehari 
normalmajoralways
closedfixed 
5
 
 
approved
No
111587
No
0056806: Terminal OffLine Master Data DiscountFIlter call timeout
The Master Data call DiscountFilterProduct has a bad performance on incremental refresh
Set a number of discounts assigning several products and execute incremental refresh on the till adding new discounts and products.
No tags attached.
related to design defect 0052716 closed Retail Retail Modules Performance issue with masterdata query: DiscountFilterProduct 
causes defect 0057118 closed marvintm POS2 The 'Query Exception' is shown after 'Refresh Masterdata' is done in VB terminal 
csv query-plan.csv (5,905) 2024-10-28 14:58
https://issues.openbravo.com/file_download.php?file_id=20391&type=bug
? HQL-Query (2,752) 2024-10-28 14:59
https://issues.openbravo.com/file_download.php?file_id=20392&type=bug
? SQL-Query (2,259) 2024-10-28 14:59
https://issues.openbravo.com/file_download.php?file_id=20393&type=bug
Issue History
2024-10-16 14:31fermin_ostivarNew Issue
2024-10-16 14:31fermin_ostivarAssigned To => Retail
2024-10-16 14:31fermin_ostivarOBNetwork customer => No
2024-10-16 14:31fermin_ostivarSupport ticket => 111587
2024-10-16 14:31fermin_ostivarTriggers an Emergency Pack => No
2024-10-17 23:48guilleaerStatusnew => acknowledged
2024-10-23 09:11guillermogilAssigned ToRetail => jorgewederago
2024-10-23 10:28guilleaerAssigned Tojorgewederago => guilleaer
2024-10-23 11:03sreehariAssigned Toguilleaer => sreehari
2024-10-23 11:03sreehariStatusacknowledged => scheduled
2024-10-28 14:58sreehariFile Added: query-plan.csv
2024-10-28 14:59sreehariFile Added: HQL-Query
2024-10-28 14:59sreehariFile Added: SQL-Query
2024-10-28 15:02sreehariNote Added: 0171056
2024-10-28 15:07sreehariNote Edited: 0171056bug_revision_view_page.php?bugnote_id=0171056#r28686
2024-11-06 06:03hgbotMerge Request Status => open
2024-11-06 06:03hgbotNote Added: 0171462
2024-11-11 08:30hgbotMerge Request Statusopen => approved
2024-11-12 07:45hgbotResolutionopen => fixed
2024-11-12 07:45hgbotStatusscheduled => closed
2024-11-12 07:45hgbotFixed in Version => RR25Q1
2024-11-12 07:45hgbotNote Added: 0171783
2024-11-12 07:45hgbotNote Added: 0171784
2024-11-16 06:33guillermogilRelationship addedcauses 0057118
2025-02-02 06:21guillermogilRelationship addedrelated to 0052716

Notes
(0171056)
sreehari   
2024-10-28 15:02   
(edited on: 2024-10-28 15:07)
Have attached the HQL & SQL queries on masterdata modal "DiscountFilterProduct".

Also attached the query-plan, which has the execution details of the existing query.

Have added additional index on "M_Offer.ad_client_id" and "M_Offer_PriceList.m_pricelist_id" but still no big difference on the execution time.

Attaching the link showing the index execution of the tables involed in the query
https://explain.depesz.com/s/FZd2#stats [^]

NOTE: The query execution was around 20 to 23 seconds which is tested with 300k+ records on related tables

(0171462)
hgbot   
2024-11-06 06:03   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1754 [^]
(0171783)
hgbot   
2024-11-12 07:45   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: a393ba3b9e5e575a07f7bc685df33a476e68903f
Author: Sreehari Venkataraman <s.venkataraman@external.orisha.com>
Date: 12-11-2024 06:45:14
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/a393ba3b9e5e575a07f7bc685df33a476e68903f [^]

Fixes ISSUE-56806: Used Preference to avoid joins for faster performance

---
M src-db/database/sourcedata/AD_PREFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/retail/posterminal/master/Discount.java
M src/org/openbravo/retail/posterminal/master/DiscountFilterProduct.java
M src/org/openbravo/retail/posterminal/master/DiscountFilterProductProperties.java
---
(0171784)
hgbot   
2024-11-12 07:45   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1754 [^]