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

--- Comment #5 from Nick Clemens (kidclamp) <[email protected]> ---
Essentially we found that if libraries add 'preferred_name' to
DefaultPatronSearchFields system preference it slows down the sql queries


SIMPLE EXAMPLE
MariaDB [koha_kohadev]> SELECT COUNT(*) FROM borrowers WHERE preferred_name
LIKE 'aaron%';
+----------+
| COUNT(*) |
+----------+
|      992 |
+----------+
1 row in set (0.052 sec)

MariaDB [koha_kohadev]> ALTER TABLE `borrowers` ADD KEY `preferred_name`
(`preferred_name`);
Query OK, 0 rows affected, 1 warning (0.155 sec)
Records: 0  Duplicates: 0  Warnings: 1

MariaDB [koha_kohadev]> SELECT COUNT(*) FROM borrowers WHERE preferred_name
LIKE 'aaron%';
+----------+
| COUNT(*) |
+----------+
|      992 |
+----------+
1 row in set (0.002 sec)

MariaDB [koha_kohadev]> 


In production with real Koha generated queries it went from several seconds per
search to under 1 second per search

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://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