We have an indexed column ( ModelName ), which is of great importance in the table and is very similar to the "Directory Number", but it is not a PC.
a lot of ORDER by ModelName ; WHERE ModelName etc.
The column originally started as NVarchar(50) , but resized in a time to 100, and now it needed 255.
I found many posts on "NVarchar(MAX) vs. NVarChar(N)" , but I canβt get the final answer:
Is there any / significant success when using NVarchar(255) instead of NVarchar(100) instead of NVarchar(50) specifically when it comes to Indexes ?
Is shorter column size (50) better than longer (255) in terms of performance? Could there be special settings for such an Index to improve performance?
Here is another link provided in the comments of @a_horse_with_no_name:
Varchar SQL column length guidelines
Pay attention to Ariel's answer: stack overflow
Where does he say:
"In particular, when sorting, a larger column takes up more space, so if this affects performance, then you need to worry about it and make them smaller."
and in the comments:
"There are also problems and limitations on indexes. An index (a, b, c, d) cannot have it when all four columns are VARCHAR (255)."
There is no final conclusion / link to documents, etc.