Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Downside of VARCHAR(MAX)
Message
De
30/08/2020 15:34:19
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
01675921
Message ID:
01675930
Vues:
49
>Would VARCHAR(256) be better? Or, what size VARCHAR()?
>
>>Don't know if this will help, but I wouldn't recommend using VARCHAR(MAX) unless there's a chance the string length will exceed 8,000 bytes
>>
>>Also, while it might not be relevant for your situation, you can't using a VARCHAR(MAX) column as part of an index key.
>>
>>varchar(max) can introduce (small) performance overhead. I'd only recommend if it there's a compelling need to do so.

My two cents (and opinions will vary on this)....take a look at your existing data, maybe see what the maximum existing length is, and then maybe bump depending on the odds that it will get bigger.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform