[Bug 11249] New: Add db indexes on borrowers names
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 Bug ID: 11249 Summary: Add db indexes on borrowers names Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: fridolyn.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org The borrowers search is by default on columns surname, firstname, othernames and cardnumber. (See C4::Members::_express_member_find). Addind db indexes will really increase the query speed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |fridolyn.somers@biblibre.co | |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 22930 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22930&action=edit Bug 11249 - Add db indexes on borrowers names See commit message -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22930|0 |1 is obsolete| | --- Comment #2 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 23001 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23001&action=edit Bug 11249 - Add db indexes on borrowers names Oups, wrong message in updatedatabase.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Architecture, internals, |Database |and plumbing | Assignee|fridolyn.somers@biblibre.co |gmcharlt@gmail.com |m | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23001|0 |1 is obsolete| | CC| |mathieu.saby@univ-rennes2.f | |r --- Comment #3 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Created attachment 23223 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23223&action=edit [PATCH][SIGNED OFF] Bug 11249 - Add db indexes on borrowers names It works, I sign off. Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23223|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 23262 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23262&action=edit [PASSED QA] Bug 11249 - Add db indexes on borrowers names The borrowers search is by default on columns surname, firstname, othernames and cardnumber. (See C4::Members::_express_member_find). Addind db indexes will really increase the query speed. This patch adds bd indexes on surname, firstname, othernames (cardnumber has already an index). Those indexes must be defined with a size because columns are mediumtext. Test plan : Test with mysql client : mysql> explain select * from borrowers where surname like 'A%'; +----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+ | 1 | SIMPLE | borrowers | range | surname_idx | surname_idx | 767 | NULL | 395 | Using where | +----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+ => key show the index is used Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, changes from updatedatabase and in kohastructure match. I think deletedborrowers can be left out, as it's not queried when doing patron searches. Patron deletes still work as expected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #5 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Fridolin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #6 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Patch pushed to 3.14.x, will be in 3.14.3. (creates updatedatabase 3.14.02.001) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org