Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Downside of VARCHAR(MAX)
Message
From
30/08/2020 15:34:19
 
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
01675921
Message ID:
01675930
Views:
50
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform