[Koha-bugs] [Bug 11249] Add db indexes on borrowers names
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Dec 3 13:41:35 CET 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11249
Katrin Fischer <katrin.fischer at bsz-bw.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #23223|0 |1
is obsolete| |
--- Comment #4 from Katrin Fischer <katrin.fischer at 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 at univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at 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.
More information about the Koha-bugs
mailing list