Summary: | Add db indexes on borrowers names | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Database | Assignee: | Galen Charlton <gmcharlt> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | glasklas, mathsabypro |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 11249 - Add db indexes on borrowers names
Bug 11249 - Add db indexes on borrowers names [PATCH][SIGNED OFF] Bug 11249 - Add db indexes on borrowers names [PASSED QA] Bug 11249 - Add db indexes on borrowers names Bug 11249: DBRev 3.15.00.006 |
Description
Fridolin Somers
2013-11-14 13:29:36 UTC
Created attachment 22930 [details] [review] Bug 11249 - Add db indexes on borrowers names See commit message Created attachment 23001 [details] [review] Bug 11249 - Add db indexes on borrowers names Oups, wrong message in updatedatabase.pl Created attachment 23223 [details] [review] [PATCH][SIGNED OFF] Bug 11249 - Add db indexes on borrowers names It works, I sign off. Mathieu Created attachment 23262 [details] [review] [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. Pushed to master. Thanks, Fridolin! Patch pushed to 3.14.x, will be in 3.14.3. (creates updatedatabase 3.14.02.001) Created attachment 74372 [details] [review] Bug 11249: DBRev 3.15.00.006 Signed-off-by: Galen Charlton <gmc@esilibrary.com> Sorry, accidentally submitted new attachment by omitting HEAD with git bz apply for another patch. Please ignore this last change. |