上周我一直在做 MS10775A 课程,出现了一个培训师无法可靠回答的问题是:
重新索引会更新统计信息吗?
我们发现网上的讨论都在争论它有没有。
在网上搜索,我发现在指定过宽的 VARCHAR 列时是否会影响性能的建议相互矛盾,例如 VARCHAR(255) 时 VARCHAR(30) 可能会这样做。
我一致认为,如果整行超过 8060 字节,性能会受到影响。除此之外,我看到了分歧。
索赔是真的The default is SET ANSI PADDING ON = potential for lots of trailing spaces
吗?只要总行宽小于 8060,过大的 VARCHAR 列是否有任何真正的性能问题?
列宽很重要的证据
The same goes for CHAR and VARCHAR data types. Don’t specify more characters in character columns that you need.
http://www.sql-server-performance.com/2007/datatypes/
Length is a constraint on the data (like CHECK, FK, NULL etc)
Performance when the row exceeds 8060 bytes
Can not have unique constraint or index (key column width must …