issues and old_issues have redundant indexes. Removing them seems to reduce dead locks occurrences. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26457 This patch doesn't try to remove existing indexes it only change DB structure for new instances.
Created attachment 110735 [details] [review] Bug 26535: Remove issues tables redundant indexes
Hi Didier, I think this is good, but is there a reason not to fix the existing installations of this is causing an issue? We aim to keep the database structure in sync. There are handy methods for checking on the existence of an index in the updatedatabase script that could be useful here.
Hi, (In reply to Katrin Fischer from comment #2) > Hi Didier, > > I think this is good, but is there a reason not to fix the existing > installations of this is causing an issue? We aim to keep the database > structure in sync. There are handy methods for checking on the existence of > an index in the updatedatabase script that could be useful here. Mostly reliability. I'm not sure testing on index name is enough, other index must exist, use the right columns, and it must be more restrictive than the deleted one.
(In reply to didier from comment #3) > Hi, > (In reply to Katrin Fischer from comment #2) > > Hi Didier, > > > > I think this is good, but is there a reason not to fix the existing > > installations of this is causing an issue? We aim to keep the database > > structure in sync. There are handy methods for checking on the existence of > > an index in the updatedatabase script that could be useful here. > Mostly reliability. > I'm not sure testing on index name is enough, other index must exist, use > the right columns, and it must be more restrictive than the deleted one. Maybe remove them all and recreate then?
We may remove 'bordate' index, it is not safe to use timestamp into an index. I cant find what it is for exactly. But with ORM use, this is likly to be useless.