Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Downside of VARCHAR(MAX)
Message
 
 
À
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:
01675931
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.

I think realistically the string of recipient email addresses should not be greater than 300. So, I will change CHAR(100) to VARCHAR(300).
Thank you for your input.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform