Openbravo Issue Tracking System - Retail Modules
View Issue Details
0052716Retail ModulesWeb POSpublic2023-06-09 14:462023-07-07 07:03
malsasua 
Retail 
highmajoralways
scheduledopen 
5
 
 
No
0052716: Performance issue with masterdata query: DiscountFilterProduct
In one customer with # of records:
- m_product: 622K
- m_offer_product: 332K
- m_offer: 700
the masterdata query DiscountFilterProduct takes more than 5 minutes

Explain Analyze:
https://explain.depesz.com/s/r75V#query [^]
n/a
Performance
related to defect 0032962 closed mario_castello [SERQA 1095] Promotions are shown although their products are not included in the assorment 
related to defect 0052040 closed ranjith_qualiantech_com Discount is applied to an excluded product if it is added in the assortment after setting the discount 
Issue History
2023-06-09 14:46malsasuaNew Issue
2023-06-09 14:46malsasuaAssigned To => Retail
2023-06-09 14:46malsasuaTriggers an Emergency Pack => No
2023-06-09 14:46malsasuaTag Attached: Performance
2023-06-15 12:26PracticsIssue Monitored: Practics
2023-06-21 12:14ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2023-06-21 12:14ranjith_qualiantech_comStatusnew => scheduled
2023-06-21 14:13ranjith_qualiantech_comRelationship addedrelated to 0032962
2023-07-07 06:15guillermogilNote Added: 0152176
2023-07-07 06:15guillermogilTypedefect => design defect
2023-07-07 06:16guillermogilRelationship addedrelated to 0052040
2023-07-07 07:03ranjith_qualiantech_comAssigned Toranjith_qualiantech_com => Retail

Notes
(0152176)
guillermogil   
2023-07-07 06:15   
Query has been reviewed and there is no room for improvement.
The only possibility is to remove filters and that will modify the output of the query so it will be reviewed as a Design Defect with Product Management so decissions can be taken.

The best approach taking into account the current case would be to create discounts based on characteristics or categories.
Also, after reviewing the current data it would be possible to remove some records of unused discounts filter by product. It will allow faster queries.