相关疑难解决方法(0)

SQL Server VARCHAR 列宽

在网上搜索,我发现在指定过宽的 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 …

sql-server-2008 sql-server varchar

15
推荐指数
1
解决办法
6441
查看次数

标签 统计

sql-server ×1

sql-server-2008 ×1

varchar ×1