0

Assuming that you have no choice but to use a varchar as the primary key of a table in MySQL, is there any advantage to using a shorter varchar length for indices, joins, foreign keys?

For example, VARCHAR(100) vs VARCHAR(255)

Scott
  • 1,863
  • 2
  • 24
  • 43
  • I don't see that the provided link has an answer to my question. I understand that using a varchar as a primary key is not ideal as compared to other options. That is not my question. My question is as above - if you have no choice but to use a varchar - is there a value to using a shorter varchar primary key? – YouCantGetThereFromHere Jan 24 '18 at 15:19
  • Thanks to Shadow for killing my question before anyone had a chance to reply. – YouCantGetThereFromHere Jan 27 '18 at 13:53

0 Answers0