开发者

Table name or column name length affect performance?

I'm using MySQL + Hibernate.

MySQ开发者_运维百科L table name length and column name length affect application performance ?

exmaple)

#1
awd (table)
id int,
awd_nm varchar(...),
tit varchar(...)

#2
award (table)
id int,
award_name varchar(...),
title varchar(...)

which is better ?


No it will not, not to any degree that you can measure.

Spend more effort making your schema easy to understand. You'll gain more in the long (and short) term than the unmeasurable femtoseconds you'll gain with shorter and unreadable schema names.


The amount of performance degradation is so miniscule (if even existent) that I would worry more about the actual data type used more then the title. You should read http://www.codeforest.net/8-great-mysql-performance-tips for a jumping off point.


As the other answers alluded to, there is a small performance penalty with longer field names.

However, the type of optimization that you propose make the schema less maintainable. What should be avoided is long names such as

product_variant_review_feature_keyword

which, though perhaps semantically makes the most sense, is too costly for repeated joins.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜