Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040514Retail ModulesWeb POSpublic2019-04-03 18:252019-04-23 18:03
aaroncalero 
rqueralta 
highmajoralways
closedfixed 
5
 
RR19Q3 
adrianromero
No
0040514: [Complementary Products] Missing indexes by m_complementary_product_id in database and websql
The table OBRECP_ComplementaryProduct is missing an index on the column M_Product_Complementary_ID.
In a customer environment with ~100000 complementary products and a Master Data Batch size of 60000 (two paged requests for the same model) the query time improves by a 35% (from 1.7 seconds to 1.1 seconds) by adding this index.

Additionally, the same index should be added also to the javascript/websql part. In the customer environment, showing complementary products without the index was taking several minutes, whereas it was taking only a few milliseconds after adding the index.
In a customer environment with a high amount of complementary products (50K+), do the full refresh login in web pos and compare the times of the ComplementaryProducts model before and after adding the index.

For the websql part, in the same environment, create a ticket and add a product with complementary products. Click on the complementary products button and compare times before and after adding the index.
No tags attached.
Issue History
2019-04-03 18:25aaroncaleroNew Issue
2019-04-03 18:25aaroncaleroAssigned To => Retail
2019-04-03 18:25aaroncaleroResolution time => 1555452000
2019-04-03 18:25aaroncaleroTriggers an Emergency Pack => No
2019-04-04 15:08rqueraltaAssigned ToRetail => rqueralta
2019-04-04 15:08rqueraltaStatusnew => scheduled
2019-04-08 22:13hgbotCheckin
2019-04-08 22:13hgbotNote Added: 0111031
2019-04-08 22:13hgbotStatusscheduled => resolved
2019-04-08 22:13hgbotResolutionopen => fixed
2019-04-08 22:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/15741c9298d57c0c93194c8271517c1fec272ec7 [^]
2019-04-23 18:03adrianromeroReview Assigned To => adrianromero
2019-04-23 18:03adrianromeroNote Added: 0111245
2019-04-23 18:03adrianromeroStatusresolved => closed
2019-04-23 18:03adrianromeroFixed in Version => RR19Q3

Notes
(0111031)
hgbot   
2019-04-08 22:13   
Repository: erp/pmods/org.openbravo.retail.complementary
Changeset: 15741c9298d57c0c93194c8271517c1fec272ec7
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Mon Apr 08 15:00:34 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/15741c9298d57c0c93194c8271517c1fec272ec7 [^]

Fixed issue 40514: [Complementary Products] Missing indexes by
m_complementary_product_id in database and websql

- Added new index in database and websql for M_Product_Complementary_ID column.

---
M src-db/database/model/tables/OBRECP_COMPLEMENTARYPRODUCT.xml
M web/org.openbravo.retail.complementary/js/modelComplementaryProduct.js
---
(0111245)
adrianromero   
2019-04-23 18:03   
Verified