I'm not sure that I understand the thought behind changing the size of an index column.
For example, I have a column that's variable character size (15)
(sorry, if I say the actual type then I still get a Forbidden error on here), but the possibilities are all unique after the first 6 characters. Does this mean that I should set the index to "column(6)"?
I
thought that this would just save the first 6 characters; eg:
// this is what I thought the index "column" would look like
csdude55
brotherhood
nickmns
not2easy
phranque
// this is what I thought the index "column(6) would look like
csdude
brothe
nickmn
not2ea
phranq
So if that was correct then "column(6)" would logically be smaller and faster.
But I did a test, creating an index for "column" and another for "column(6)". I used EXPLAIN to run a select query on a value that was 12 characters long, and the selected index was "column(6)". Then I did another query on a value that was 6 characters long, and the selected index was "column" (without the size limit).
So I guess that my logic is wrong, and that it's not always faster?