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

--- Comment #5 from didier <[email protected]> ---
(In reply to David Cook from comment #4)
> 
> I see that itemnumber_idx is redundant, but how is issuesborridx redundant?
> It's not the same as bordate. 
bordate is a composed index with borrowernumber first and mysql is able to use
it for search on borrowernumber only.

 explain select * from issues where borrowernumber = 3;
+------+-------------+--------+------+-----------------------+---------------+---------+-------+------+-------+
| id   | select_type | table  | type | possible_keys         | key           |
key_len | ref   | rows | Extra |
+------+-------------+--------+------+-----------------------+---------------+---------+-------+------+-------+
|    1 | SIMPLE      | issues | ref  | issuesborridx,bordate | issuesborridx |
5       | const | 1    |       |
+------+-------------+--------+------+-----------------------+---------------+---------+-------+------+-------+

drop index issuesborridx on issues;
explain select * from issues where borrowernumber = 3;
+------+-------------+--------+------+---------------+---------+---------+-------+------+-------+
| id   | select_type | table  | type | possible_keys | key     | key_len | ref 
 | rows | Extra |
+------+-------------+--------+------+---------------+---------+---------+-------+------+-------+
|    1 | SIMPLE      | issues | ref  | bordate       | bordate | 5       |
const | 1    |       |
+------+-------------+--------+------+---------------+---------+---------+-------+------+-------+

> 
> > I'll try, maybe adding a fat sleep(5) in transaction block.
> 
> Certainly worth experimenting.
I did it but was unable to reproduce the deadlock even with a sleep(5) and 8
concurrent plack workers.

-- 
You are receiving this mail because:
You are the assignee for the bug.
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