Openbravo Issue Tracking System - Retail Modules
View Issue Details
0047314Retail ModulesWeb POSpublic2021-07-01 13:342021-07-27 11:09
shuehner 
ranjith_qualiantech_com 
normalminorhave not tried
closedfixed 
5
 
RR21Q4 
No
0047314: Review indexes for obpos_errors_line table
That table was added without any indexes created.

That leads to id being access via sequential scan on every query which is not efficient (if table grows).

All queries should be reviewed and the required indexes created.

For queries at least check for
- PaidReceipts
- likely indexes
  - obpos_errors_id
  - maybe record_id (to check plans with real data)
in a webpos production instance:
select * from pg_stat_user_tables order by seq_tup_read desc;

Data shown:
- 4.2M seq scans
- 5B tuples read
- only 4k index scans (via pk)
NOR
Issue History
2021-07-01 13:34shuehnerNew Issue
2021-07-01 13:34shuehnerAssigned To => Retail
2021-07-01 13:34shuehnerTriggers an Emergency Pack => No
2021-07-01 13:37shuehnerTag Attached: NOR
2021-07-01 13:37shuehnerResolution time => 1626904800
2021-07-07 11:18rafarodaIssue Monitored: rafaroda
2021-07-08 08:30ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-07-08 11:00sebastien_lironIssue Monitored: sebastien_liron
2021-07-16 09:30guilleaerStatusnew => scheduled
2021-07-26 13:31hgbotNote Added: 0130761
2021-07-27 11:09hgbotResolutionopen => fixed
2021-07-27 11:09hgbotStatusscheduled => closed
2021-07-27 11:09hgbotFixed in Version => RR21Q4
2021-07-27 11:09hgbotNote Added: 0130775
2021-07-27 11:09hgbotNote Added: 0130776

Notes
(0130761)
hgbot   
2021-07-26 13:31   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/524 [^]
(0130775)
hgbot   
2021-07-27 11:09   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: c120ab3ef405e1ced14c009c4b16deef25bec991
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-07-26T13:27:07+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/c120ab3ef405e1ced14c009c4b16deef25bec991 [^]

Fixed ISSUE-47314: Added index to OBPOS_Errors, OBPOS_Errors_Line table

---
M src-db/database/model/tables/OBPOS_ERRORS.xml
M src-db/database/model/tables/OBPOS_ERRORS_LINE.xml
---
(0130776)
hgbot   
2021-07-27 11:09   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/524 [^]