Openbravo Issue Tracking System - Modules | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0045702 | Modules | External Data Integration | public | 2021-01-08 09:53 | 2023-07-04 12:35 |
| Reporter | javietxe | ||||
| Assigned To | Triage Platform Base | ||||
| Priority | normal | Severity | major | Reproducibility | have not tried |
| Status | new | Resolution | open | ||
| Platform | OS | 5 | OS Version | ||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Merge Request Status | |||||
| Regression date | |||||
| Regression introduced by commit | |||||
| Regression level | |||||
| Review Assigned To | |||||
| Support ticket | |||||
| OBNetwork customer | Gold | ||||
| Regression introduced in release | |||||
| Summary | 0045702: Optimisation in query in EDL | ||||
| Description | More detailed information: https://docs.google.com/document/d/1zkFyolgmkhN3iVXfHtXmJ6eZemmfEYrHEY9fScXGkPE/edit?usp=sharing [^] In ProcessRequest class, there exists this query. The “Or” condition is slowing down processing of “EDL Request” and CPU/mem consumption under heavy load with a lot of data in “OBEDL_Request_Line“ table. hql = new StringBuilder(); hql.append(" select count(*) from ").append(OBEDLRequestLine.ENTITY_NAME); hql.append(" where ").append(OBEDLRequestLine.PROPERTY_EDLREQUEST).append(" = :request"); hql.append(" and ("); hql.append(OBEDLRequestLine.PROPERTY_STATUS) .append(" = '") .append(REQUEST_STATUS_PROCESSING) .append("'"); hql.append(" or ") .append(OBEDLRequestLine.PROPERTY_STATUS) .append(" = '") .append(STATUS_SCHEDULED) .append("'"); hql.append(" )"); | ||||
| Steps To Reproduce | N/A | ||||
| Proposed Solution | StringBuilder sql = new StringBuilder(); sql.append("SELECT sum(CASE WHEN ") .append(OBEDLRequestLine.PROPERTY_STATUS) .append(" = '") .append(REQUEST_STATUS_PROCESSING) .append("'") .append(" THEN 1 ") .append(" WHEN ") .append(OBEDLRequestLine.PROPERTY_STATUS) .append(" = '") .append(STATUS_SCHEDULED) .append("'") .append(" THEN 1 ") .append(" ELSE 0 END) as nbvalue") .append(" FROM ") .append(OBEDLRequestLine.ENTITY_NAME) .append(" where ") .append("obedl_request_id").append(" = '").append(request.getId()).append("'"); | ||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2021-01-08 09:53 | javietxe | New Issue | |||
| 2021-01-08 09:53 | javietxe | Assigned To | => platform | ||
| 2021-01-08 09:53 | javietxe | Resolution time | => 1611874800 | ||
| 2021-01-08 09:53 | javietxe | OBNetwork customer | => Gold | ||
| 2022-02-01 08:07 | alostale | Assigned To | platform => Triage Platform Base | ||
| There are no notes attached to this issue. |