Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing a SQL command
Message
De
13/09/2013 15:05:47
 
 
À
13/09/2013 13:17:25
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01583170
Message ID:
01583213
Vues:
44
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform