I have a table like this:
something
a [INT]
b [INT]
c [INT]
…where a, b and c are separate Foreign Keys pointing to three different table.id. Since I want to make all regs be unique, and after having read this great answer, I think I should create a new Index this way: UNIQUE INDEX(a, b, c) and (in my case) do IGNORE INSERTS.
But as you can see, I would have one KEY for each column and then another extra UNIQUE INDEX containing all three. Is this a normal thing? It seems strange to me, and I have never seen it.
It is perfectly normal and reasonable to include a column in more than one index. However, if the combination of (a, b, c) is enough to uniquely identify a row it seems that you want a
PRIMARYindex instead of aUNIQUEone here (technically there is very little difference, but semantically it might be the better choice).