[Koha-bugs] [Bug 31222] DBIC queries for batch mod can be very large
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jul 22 16:48:34 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31222
--- Comment #1 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 138038
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138038&action=edit
Bug 31222: Reduce query size for batchMod
The object search is currently:
Koha::Items->search({ barcode => \@contentlist }
Which generate code like:
barcode = 1 OR barcode = 2 OR barcode = 3 ....
This can get quite large
We can reduce the query size by using -in:
Koha::Items->search({ barcode => { -in => \@contentlist } }
Which generates code like:
barcode in ( 1, 2, 3 )
To test:
1 - Apply patch
2 - Perform batch modifications
3 - Confirm nothing has changed
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list