Bug 33303

Summary: Performance issues/timeouts in item search
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: SearchingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: mathsabypro
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33514
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2023-03-22 11:07:22 UTC
When using items from more_subfields_xml in item search there are performance issues, especially on bigger data sets.

more_subfields_xml is an XML blob type column in the items table, that will be used when you create additional item fields not mapped to another column in the items table.

Not sure if something could be done here, but maybe there is something we could do to optimize processing?
Comment 1 Katrin Fischer 2023-04-13 16:06:59 UTC
It looks like there is a general issue with item search being very slow in some cases. One issue is left truncation of search terms.

The example is an ISBN search. Multiple ISBN are stored in biblioitems.isbn | separated with additional ISBD punctuation. So you'll need to truncate left and right to make sure you get correct results.

Left truncation creates an issue as we assume the index on the field cannot be used in this case.