[英]Is MySQL enum performance slower than INT?
Is it better to have a field status enum('active', 'hidden', 'deleted')
OR status tinyint(3)
with a lookup table?有一个带有查找表的字段status enum('active', 'hidden', 'deleted')
或status tinyint(3)
是否更好? Assume that status can take only one value at a time.假设状态一次只能取一个值。
In particular, I am interested in knowing if operations on enum
are significantly slower than or as fast as operations on int
?特别是,我想知道enum
上的操作是否比int
操作明显慢或一样快?
There is a related question on SO but: SO上有一个相关的问题,但是:
This is already discussed on popular http://www.mysqlperformanceblog.com , check out this post:这已经在流行的http://www.mysqlperformanceblog.com上讨论过,看看这篇文章:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.