Openbravo Issue Tracking System - Retail Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0043080 | Retail Modules | Web POS | public | 2020-01-31 11:17 | 2020-01-31 11:29 |
Reporter | ALopetegui | ||||
Assigned To | Retail | ||||
Priority | high | Severity | major | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | pi | ||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0043080: Performance: HQL Query validated has inefficient query to get property of preference | ||||
Description | In ProcessHQLQueryValidated class there is a function to get the property of the preferences doing this query: select property from ad_preference where property like '%EntitySelector_BPartnerFilter_bpName_s' limit 1 This query makes a sequential scan on ad_preference. This query is very frequent and makes too much read from memory/disk. This is the explain plan https://explain.depesz.com/s/JJny [^] | ||||
Steps To Reproduce | With more than 100K ad_preferences and heavy searching concurrency, the query could be a problem. To test it just launch a query with more than 100K preferences. | ||||
Proposed Solution | The solution is to create a gin index in ad_preference on column property in order to find with and contains index. CREATE INDEX <index-name> ON ad_preference USING GIN (property gin_trgm_ops); This is the explain plan after the index: https://explain.depesz.com/s/RS8c [^] | ||||
Additional Information | |||||
Tags | Performance | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2020-01-31 11:17 | ALopetegui | New Issue | |||
2020-01-31 11:17 | ALopetegui | Assigned To | => Retail | ||
2020-01-31 11:17 | ALopetegui | Triggers an Emergency Pack | => No | ||
2020-01-31 11:27 | ALopetegui | Tag Attached: Performance | |||
2020-01-31 11:29 | ALopetegui | Priority | normal => high |
There are no notes attached to this issue. |