在英文 sql2005中 比较nvarchar 与 varchar的速度

 

declare @str1 varchar(max);
declare @count int;

set @count = 0;
print 'begin'
while @count < 10000000
begin
set @str1 = @str1 + '*';
set @count = @count +1;
end
print @str1
print 'end'
--time usage:00:01:17

declare @str1 nvarchar(max);
declare @count int;

set @count = 0;
print 'begin'
while @count < 10000000
begin
set @str1 = @str1 + '*';
set @count = @count +1;
end
print @str1
print 'end'
--time usage:00:01:17

--conclusion the same

 

posted on 2013-07-26 13:47  Orz..  阅读(191)  评论(0)    收藏  举报

导航