Openbravo Issue Tracking System - Retail Modules | ||||||||||||
| View Issue Details | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0033119 | Retail Modules | Web POS | public | 2016-06-02 18:05 | 2016-07-05 18:45 | |||||||
| Reporter | shuehner | |||||||||||
| Assigned To | Retail | |||||||||||
| Priority | high | Severity | major | Reproducibility | have not tried | |||||||
| Status | closed | Resolution | fixed | |||||||||
| Platform | OS | 5 | OS Version | |||||||||
| Product Version | ||||||||||||
| Target Version | RR16Q2.1 | Fixed in Version | ||||||||||
| Merge Request Status | ||||||||||||
| Review Assigned To | marvintm | |||||||||||
| OBNetwork customer | No | |||||||||||
| Support ticket | ||||||||||||
| Regression level | ||||||||||||
| Regression date | ||||||||||||
| Regression introduced in release | ||||||||||||
| Regression introduced by commit | ||||||||||||
| Triggers an Emergency Pack | No | |||||||||||
| Summary | 0033119: Cashup does sequential scan of c_order table which takes very long with many orders. | |||||||||||
| Description | The OrderGroupingProcess.java which is part of the cashup has 2 queries which filter c_order by cashup id (orders related to cashup being currently processes). As the c_order table does not have an index for that cashup_id field this leads to 2 sequential scan's of the table which for high number or orders take very long. In test database with only 4.3M c_order each of the 2 queries takes roughly 3.2 seconds because of that. Adding index on that column reduces that time to a lot less (few hundred ms). Queries are: - OrderGroupingProcessorData.java:selectSplitOrderLines - insertHeaderNoGrouping Maybe also the grouping version of the 2nd | |||||||||||
| Steps To Reproduce | Found by following sequence: configure postgres db to log all queries i.e. slower than 1s Take database with big number of c_order configure to make invoice per order inside cashup. Make i.e. 87 tickets with 2 lines each Then process cashup. Check pg log | |||||||||||
| Proposed Solution | add index for cashup_id to c_order table | |||||||||||
| Additional Information | ||||||||||||
| Tags | No tags attached. | |||||||||||
| Relationships |
| |||||||||||
| Attached Files | ||||||||||||
| Issue History | ||||||||||||
| Date Modified | Username | Field | Change | |||||||||
| 2016-06-02 18:11 | Orekaria | Type | defect => backport | |||||||||
| 2016-06-02 18:11 | Orekaria | Target Version | RR16Q3 => RR16Q2 | |||||||||
| 2016-06-03 15:03 | marvintm | Target Version | RR16Q2 => RR16Q2.1 | |||||||||
| 2016-07-05 10:12 | migueldejuana | Note Added: 0088196 | ||||||||||
| 2016-07-05 10:12 | migueldejuana | Status | scheduled => resolved | |||||||||
| 2016-07-05 10:12 | migueldejuana | Resolution | open => fixed | |||||||||
| 2016-07-05 18:45 | marvintm | Review Assigned To | => marvintm | |||||||||
| 2016-07-05 18:45 | marvintm | Status | resolved => closed | |||||||||
| Notes | |||||
|
|
|||||
|
|
||||