Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0043085 | Retail Modules | Web POS | public | 2020-01-31 12:36 | 2020-02-14 20:38 | |||||||
Reporter | ALopetegui | |||||||||||
Assigned To | ranjith_qualiantech_com | |||||||||||
Priority | high | Severity | major | Reproducibility | have not tried | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | RR20Q2 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | guilleaer | |||||||||||
OBNetwork customer | Gold | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0043085: LoginUtilsServlet makes an inefficient query to get user images | |||||||||||
Description | The query to get the users which can be login in the webpos and also the query to get the users for approvals, makes several sub select in the from clause. This query could be improved joining the tables instead of doing exists. Those queries are launched quite often, mainly the query for the login users. The queries are done in loginUtilsSerlet class, o getUserImages function: [1]https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/src/org/openbravo/retail/posterminal/LoginUtilsServlet.java#l132 [^] [1]Explain plan: https://explain.depesz.com/s/2pTJ [^] [2]https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/src/org/openbravo/retail/posterminal/LoginUtilsServlet.java#l151 [^] [2] Explain plan: https://explain.depesz.com/s/o9jq [^] | |||||||||||
Steps To Reproduce | The first query is launched loading the webpos initial page. The second query is launched when the user needs an approval for other user in any action. The queries individually are not very bad, but with high concurrency could be a problem. | |||||||||||
Proposed Solution | Rewrite the hql query in order to avoid the exists subselects and put all the tables in the from clause: These are the explain plan with the query adapted, the improvement is almost the 50%. [1] https://explain.depesz.com/s/GycY [^] [2] https://explain.depesz.com/s/YRA2 [^] | |||||||||||
Additional Information | ||||||||||||
Tags | Performance | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2020-01-31 12:36 | ALopetegui | New Issue | ||||||||||
2020-01-31 12:36 | ALopetegui | Assigned To | => Retail | |||||||||
2020-01-31 12:36 | ALopetegui | OBNetwork customer | => Gold | |||||||||
2020-01-31 12:36 | ALopetegui | Triggers an Emergency Pack | => No | |||||||||
2020-02-04 14:11 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com | |||||||||
2020-02-04 14:13 | ranjith_qualiantech_com | Status | new => scheduled | |||||||||
2020-02-05 15:19 | guilleaer | Resolution time | => 1582153200 | |||||||||
2020-02-06 10:36 | ALopetegui | Tag Attached: Performance | ||||||||||
2020-02-10 07:14 | hgbot | Checkin | ||||||||||
2020-02-10 07:14 | hgbot | Note Added: 0117582 | ||||||||||
2020-02-10 07:14 | hgbot | Status | scheduled => resolved | |||||||||
2020-02-10 07:14 | hgbot | Resolution | open => fixed | |||||||||
2020-02-10 07:14 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c027ae221f7e4043a27c4c8c1380835d53413c4e [^] | |||||||||
2020-02-10 09:12 | guilleaer | Review Assigned To | => guilleaer | |||||||||
2020-02-10 09:12 | guilleaer | Status | resolved => closed | |||||||||
2020-02-10 09:12 | guilleaer | Fixed in Version | => RR20Q2 | |||||||||
2020-02-12 10:16 | ALopetegui | Note Added: 0117679 | ||||||||||
2020-02-13 06:41 | hgbot | Checkin | ||||||||||
2020-02-13 06:41 | hgbot | Note Added: 0117714 | ||||||||||
2020-02-13 06:41 | hgbot | Status | closed => resolved | |||||||||
2020-02-13 06:41 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c027ae221f7e4043a27c4c8c1380835d53413c4e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6ef57085849a2568a712ed4fbfec1c529984b10e [^] | |||||||||
2020-02-14 20:38 | guilleaer | Note Added: 0117819 | ||||||||||
2020-02-14 20:38 | guilleaer | Status | resolved => closed | |||||||||
2020-04-23 08:22 | ranjith_qualiantech_com | Relationship added | causes 0043828 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|