I am just starting to explore optimization for my MySQL database. From what I'm reading, indexing seems like a good idea - so I want to create an index on one of the VARCHAR columns in the table using the MyISAM mechanism.
From what I'm reading, I understand that the index is limited to 1000 bytes. The VARCHAR is 3 bytes in size. Does this mean that if I want to index a 50-row VARCHAR column, do I need a 6-character index prefix? (1000 bytes / 50 lines / 3 bytes per character = 6.66)
If so, it seems a little complicated - thatβs why I doubt my understanding. It seems rather strange that you could index 333 rows in a VARCHAR column using a 1 character prefix.
Did I miss something?
mysql indexing
Tommy
source share