[英]Converting nvarchar(4000) to nvarchar(max)
We have a few tables in our SQL Server (2005 & 2008) database with columns defined as nvarchar(4000). 我们的SQL Server(2005和2008)数据库中有几个表,其列定义为nvarchar(4000)。 We sometimes need to be able to store more data than that and consider to use nvarchar(max) instead.
我们有时需要能够存储更多的数据,并考虑使用nvarchar(max)。 Now to the questions.
现在回答问题。
Regards Johan 关心约翰
We've had to do this as well in a few spots 我们不得不在几个地方做到这一点
If the text does not fit on the page with the rest of the data, the text will be stored in another page. 如果文本不适合包含其余数据的页面,则文本将存储在另一页中。 This causes an extra database page read.
这会导致额外的数据库页面读取。 So performance can/will be slower.
因此性能可以/将会更慢。 On systems with a heavy load, and a very restricted response time, maybe.
在负载较重的系统上,响应时间非常有限。
The SQL Server Management studio will probably rename the current table, create a new one with the new layout, copy data, remove old table. SQL Server Management工作室可能会重命名当前表,使用新布局创建一个新表,复制数据,删除旧表。 This can be slow.
这可能很慢。
I don't know if the alter table will work. 我不知道alter table是否有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.