If I have a composite index on (a, b), I understand that queries related only to 'a' will still use the composite index (but not queries related to 'b')
My question is, is there any reasonable reason to have an index with one column on 'a' if I have an index (a, b)? What I read seemed vague as to whether the index (a, b) is a complete replacement for a, or just the “better than nothing” index.
This assumes that I am filtering both a and a, b. I have a table with too many indexes that degrades write performance and wants to double check before dropping indexes, which I'm only sure are of no use.
Also, does this answer vary depending on whether I use InnoDb or MyISAM? The corresponding table is MyISAM, but most of our tables are InnoDb.
source
share