I've some specific use case for certain default wordrpess tables, which I need to add a few indexes to certain columns to improve performance. I'm wondering will adding these indexes break future Wordpress update when they choose to add index to the same column?
1 Answer
Adding a BTREE
or HASH
index shouldn't break anything, and I imagine that is what you want. At worst you could end up with multiple indexes, or less than optimal ones, which might negatively effect performance. I assume that if you are going to do this you will be evaluating the change to see if it actually does help, rather than hurt.
I guess you could run into trouble with a UNIQUE
index, since WordPress does use a couple of those.
-
Yes, I've evaluated the changes in dev. Now I'm planning to push to production. So Wordpress will actually skip on duplicate index when it update? I'm worried that it will break the update and becoming hard to trace later on– faultyCommented Dec 4, 2012 at 5:41
-
1It isn't without some risk but nothing critical should depend on an index.– s_ha_dumCommented Dec 4, 2012 at 5:44