Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing a SQL command
Message
From
13/09/2013 15:05:47
 
 
To
13/09/2013 13:17:25
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01583170
Message ID:
01583213
Views:
45
This field is a Varchar(MAX).

You probably already saw this from your exchanges with Naomi (I agree Naomi, this is a good discussion topic).

SQL Server runs through a different internal execution when dealing with VARCHAR(MAX) as opposed to VARCHAR(N). It's because SQL Server can't store/reference VARCHAR(MAX) as a straight/contiguous block of memory, since it can go up to 2 GB.

I found a link here that talks about the difference in performance being anywhere from 10% to 25%.

http://rusanu.com/2010/03/22/performance-comparison-of-varcharmax-vs-varcharn/

Maybe the other factors you mentioned (corruption) might also apply, but wanted to share this link. It doesn't offer any kind of solution if you're required to use MAX, but it does illustrate the differences in a simple test.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform