Koha/installer/data/mysql
Fridolyn SOMERS 19b5c9b4ce 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).

Adding DB indexes will really increase the query speed.

This patch adds DB 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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-17 15:25:55 +00:00
..
atomicupdate Bug 7475: Update configuration 2012-09-19 17:15:25 +02:00
de-DE Bug 11261: make sample serial frequencies mandatory during installation 2013-12-13 18:34:05 +00:00
en Bug 11261: make sample serial frequencies mandatory during installation 2013-12-13 18:34:05 +00:00
es-ES Bug 11261: make sample serial frequencies mandatory during installation 2013-12-13 18:34:05 +00:00
fr-FR Bug 11261: make sample serial frequencies mandatory during installation 2013-12-13 18:34:05 +00:00
it-IT Bug 11261: make sample serial frequencies mandatory during installation 2013-12-13 18:34:05 +00:00
nb-NO Bug 11261: make sample serial frequencies mandatory during installation 2013-12-13 18:34:05 +00:00
pl-PL Bug 11261: make sample serial frequencies mandatory during installation 2013-12-13 18:34:05 +00:00
ru-RU Bug 11261: make sample serial frequencies mandatory during installation 2013-12-13 18:34:05 +00:00
uk-UA Bug 11261: make sample serial frequencies mandatory during installation 2013-12-13 18:34:05 +00:00
backfill_statistics.pl Bug 5370: Fix all the references to koha.org 2010-11-08 09:41:49 +13:00
kohastructure.sql Bug 11249: Add Db indexes on borrowers names 2013-12-17 15:25:55 +00:00
labels_upgrade.pl Bug 2505 - Add commented use warnings where missing in the installer/ directory 2010-04-21 20:26:28 +12:00
patroncards_upgrade.pl Bug 2505 - Add commented use warnings where missing in the installer/ directory 2010-04-21 20:26:28 +12:00
sample_only_param_tables.sql
sysprefs.sql Bug 8230: Display acquisition details on the catalogue detail page 2013-12-13 23:22:05 +00:00
update22to30.pl Bug 8289 Upgrading from 2.2 does not work anymore 2012-06-25 16:15:42 +02:00
updatedatabase.pl Bug 11249: Add Db indexes on borrowers names 2013-12-17 15:25:55 +00:00