开发者

In mysql, does the size of VARCHAR(size) make any difference in performance? [duplicate]

This question already has answers here: Closed 11开发者_StackOverflow中文版 years ago.

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜