https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29134 Bug ID: 29134 Summary: Patron search has poor performance when ExtendedAttributes enabled and many attributes match Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org When system preference ExtendedPatronAttributes is enabled the patron search finds all patrons with a matching attribute and builds a where string with all the borrowernumbers concatted into an 'IN' my @matching_borrowernumbers = Koha::Patrons->filter_by_attribute_value($searchmember)->get_column('borrowernumber'); for my $borrowernumber ( @matching_borrowernumbers ) { push @where_strs_or, "borrowers.borrowernumber = ?"; push @where_args, $borrowernumber; } When there are too many matches on a system with many patrons/attributes this generates a very large query which takes a very long time to return -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.