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

--- Comment #2 from Julian Maurice <julian.maur...@biblibre.com> ---
perl -MKoha::Patrons -E 'my $patrons =
Koha::Patrons->search_patrons_to_anonymise; $patrons->next'

generated the following SQL query:

SELECT `me`.`borrowernumber`, `me`.`cardnumber`, `me`.`surname`,
`me`.`firstname`, `me`.`title`, `me`.`othernames`, `me`.`initials`,
`me`.`streetnumber`, `me`.`streettype`, `me`.`address`, `me`.`address2`,
`me`.`city`, `me`.`state`, `me`.`zipcode`, `me`.`country`, `me`.`email`,
`me`.`phone`, `me`.`mobile`, `me`.`fax`, `me`.`emailpro`, `me`.`phonepro`,
`me`.`B_streetnumber`, `me`.`B_streettype`, `me`.`B_address`,
`me`.`B_address2`, `me`.`B_city`, `me`.`B_state`, `me`.`B_zipcode`,
`me`.`B_country`, `me`.`B_email`, `me`.`B_phone`, `me`.`dateofbirth`,
`me`.`branchcode`, `me`.`categorycode`, `me`.`dateenrolled`, `me`.`dateexpiry`,
`me`.`date_renewed`, `me`.`gonenoaddress`, `me`.`lost`, `me`.`debarred`,
`me`.`debarredcomment`, `me`.`contactname`, `me`.`contactfirstname`,
`me`.`contacttitle`, `me`.`guarantorid`, `me`.`borrowernotes`,
`me`.`relationship`, `me`.`sex`, `me`.`password`, `me`.`flags`, `me`.`userid`,
`me`.`opacnote`, `me`.`contactnote`, `me`.`sort1`, `me`.`sort2`,
`me`.`altcontactfirstname`, `me`.`altcontactsurname`,
`me`.`altcontactaddress1`, `me`.`altcontactaddress2`,
`me`.`altcontactaddress3`, `me`.`altcontactstate`, `me`.`altcontactzipcode`,
`me`.`altcontactcountry`, `me`.`altcontactphone`, `me`.`smsalertnumber`,
`me`.`sms_provider_id`, `me`.`privacy`, `me`.`privacy_guarantor_checkouts`,
`me`.`checkprevcheckout`, `me`.`updated_on`, `me`.`lastseen`, `me`.`lang`,
`me`.`login_attempts`, `me`.`overdrive_auth_token` FROM `borrowers` `me` LEFT
JOIN `old_issues` `old_issues` ON `old_issues`.`borrowernumber` =
`me`.`borrowernumber` WHERE ( ( `old_issues`.`borrowernumber` IS NOT NULL AND
`privacy` <> '0' AND `returndate` < '2018-02-12 15:32:29' ) ) GROUP BY
`me`.`borrowernumber`, `me`.`cardnumber`, `me`.`surname`, `me`.`firstname`,
`me`.`title`, `me`.`othernames`, `me`.`initials`, `me`.`streetnumber`,
`me`.`streettype`, `me`.`address`, `me`.`address2`, `me`.`city`, `me`.`state`,
`me`.`zipcode`, `me`.`country`, `me`.`email`, `me`.`phone`, `me`.`mobile`,
`me`.`fax`, `me`.`emailpro`, `me`.`phonepro`, `me`.`B_streetnumber`,
`me`.`B_streettype`, `me`.`B_address`, `me`.`B_address2`, `me`.`B_city`,
`me`.`B_state`, `me`.`B_zipcode`, `me`.`B_country`, `me`.`B_email`,
`me`.`B_phone`, `me`.`dateofbirth`, `me`.`branchcode`, `me`.`categorycode`,
`me`.`dateenrolled`, `me`.`dateexpiry`, `me`.`date_renewed`,
`me`.`gonenoaddress`, `me`.`lost`, `me`.`debarred`, `me`.`debarredcomment`,
`me`.`contactname`, `me`.`contactfirstname`, `me`.`contacttitle`,
`me`.`guarantorid`, `me`.`borrowernotes`, `me`.`relationship`, `me`.`sex`,
`me`.`password`, `me`.`flags`, `me`.`userid`, `me`.`opacnote`,
`me`.`contactnote`, `me`.`sort1`, `me`.`sort2`, `me`.`altcontactfirstname`,
`me`.`altcontactsurname`, `me`.`altcontactaddress1`, `me`.`altcontactaddress2`,
`me`.`altcontactaddress3`, `me`.`altcontactstate`, `me`.`altcontactzipcode`,
`me`.`altcontactcountry`, `me`.`altcontactphone`, `me`.`smsalertnumber`,
`me`.`sms_provider_id`, `me`.`privacy`, `me`.`privacy_guarantor_checkouts`,
`me`.`checkprevcheckout`, `me`.`updated_on`, `me`.`lastseen`, `me`.`lang`,
`me`.`login_attempts`, `me`.`overdrive_auth_token`

So it basically just added a GROUP BY with all columns. Can it affect
performances ?

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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