I am interested is NVarchar(MAX) a good data type is I want to store short unicode strings which are 1-50 characters long, but most of them (more than 90%) are 5-10 characters long?
The column will not be used in comparison and ordering queries. It might be added to index as included column. Expected rows count - more than 10M.
Any recommendations? Thank you in advance!
Why would you use nvarchar(MAX) for such short strings? If you know the maximum length is 50 characters, make it nvarchar(50).
Also, I do not believe an nvarchar(MAX) column can be included in an index as it would break the 900 byte limit.
I would suggest that nvarchar(50) is more appropriate if the maximum length is indeed 50.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With