https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39322

--- Comment #8 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 181859
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181859&action=edit
Bug 39322: (follow-up) Further improvements

This patch updates the query logic of create_from_statistic for borrower
attributes.

We replace the count of attributes types with a query to fetch all
attributes type codes where keep_for_pseudonymization is set.

We then check for content in that array before using it to perform a
filtered search on the patrons extended_attributes to only return
attributes set for pseudonymization.

This should result in the same skip of extended_attributes fetch should
no attribute types be set to pseudonymization, but it should also reduce
the 1 call to attribute types per attribute the patron has to just a
single filtered call for patron attributes attributes followed by the
store call for each pseudonymizated attribute.

Test plan:
As before, except there should be even fewer sql calls to the database
than before for the case where there are attributes.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to