Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050302Retail ModulesWeb POSpublic2022-09-21 15:002022-10-06 08:10
closedno change required 
0050302: Adding Index on the Orderline and Invoiceline table to improve the performance.
Delete on the m_offer table causing IO and contention.
The delete was only for one offer but seems to be slow due to the foreign key in other tables referring to the m_offer_id column on the m_offer table.
When there is a constraint postgresql check if there is any row pointing to the deleted entry.
 The following tables pointing to the m_offer without index on the reference column
1. c_orderline
2. c_orderline_offer
3. c_invoiceline
4. c_invoiceline_offer

Fix: Create indexes on the m_offer_id column on the 4 tables.
No tags attached.
diff 50302.diff (2,915) 2022-10-06 08:10
Issue History
2022-09-21 15:00swathi_kamalNew Issue
2022-09-21 15:00swathi_kamalAssigned To => Retail
2022-09-21 15:00swathi_kamalTriggers an Emergency Pack => No
2022-09-27 08:41ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-09-27 08:41ranjith_qualiantech_comStatusnew => scheduled
2022-10-06 08:08marvintmNote Added: 0141710
2022-10-06 08:08marvintmStatusscheduled => closed
2022-10-06 08:08marvintmResolutionopen => no change required
2022-10-06 08:08marvintmReview Assigned To => marvintm
2022-10-06 08:10ranjith_qualiantech_comFile Added: 50302.diff

2022-10-06 08:08   
Adding those indices for all customers doesn't seem to be a good decision, as it will make insertion slow for all of them ,and especially the orderline and invoiceline tables are generally already quite big, but at the same time it will not necessarily provide a huge benefit for them.

If some customer in particular needs those indices, they can be added for them specifically.