[CIRCSTORE-114] Investigate and fix query open loan by item id Created: 07/Mar/19 Updated: 12/Mar/19 Resolved: 08/Mar/19 |
|
| Status: | Closed |
| Project: | mod-circulation-storage |
| Components: | None |
| Affects versions: | None |
| Fix versions: | 7.0.0 |
| Type: | Task | Priority: | P3 |
| Reporter: | Hongwei Ji | Assignee: | Hongwei Ji |
| Resolution: | Done | Votes: | 0 |
| Labels: | platform-backlog | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Sprint: | Core: Platform - Sprint 58 |
| Story Points: | 1 |
| Development Team: | Core: Platform |
| Description |
|
It was reported by EBSCO that following query used by mod-rtac is slow. Investigate and fix. |
| Comments |
| Comment by Hongwei Ji [ 08/Mar/19 ] |
|
The query generated cannot use the index. For example: Query: SELECT COUNT(*) FROM supertenant_mod_circulation_storage.loan WHERE (lower(f_unaccent(loan.jsonb->>'itemId')) LIKE lower(f_unaccent('00007443-1460-410e-bd22-305abf53ed6a'))) AND (lower(f_unaccent(loan.jsonb->'status'->>'name')) LIKE lower(f_unaccent('Open'))) Index: "loan_itemid_idx_unique" UNIQUE, btree (f_unaccent(jsonb ->> 'itemId'::text)) WHERE ((jsonb -> 'status'::text) ->> 'name'::text) = 'Open'::text |
| Comment by Hongwei Ji [ 08/Mar/19 ] |
|
Move to the right project mod-circulation-storage and add fix version. |