In mysql, does the size of VARCHAR(size) make any difference in performance? [duplicate]
Possible Duplicate:
Importance of varchar length in MySQL table
For example, are VARCHAR(50) and VARCHAR(100) any different other than the max number of chars they can store?
It shouldn't make much difference in most cases. For short but often changing data you could consider using constant sized char instead (that makes a difference when length of contained string changes often).
But when your query makes a temporary table then smaller is better indeed (because they could be converted to constant size char for optimalization reasons, so they will exceed to maximum limit, resulting in larger temporary table).
精彩评论