title: Using indexes with NVarchar(50) vs. NVarchar(255) column?
body: <p>We have an indexed column (<code>ModelName</code>) which has a big importance in the table and is very similar to a "Catalog Number", but it's not the PK.   </p>
  
  <p>a lot of <code>ORDER by ModelName</code> ; <code>WHERE ModelName</code> etc, is being used.</p>
  
  <p>The column originally started as  <code>NVarchar(50)</code>, but changed size over the time to 100, and now it's needed to be 255.</p>
  
  <p>I have found many posts on <code>"NVarchar(MAX) vs. NVarChar(N)"</code>, but I can't get a conclusive answer:</p>
  
  <p>Is there a any/significant  performance hit using <code>NVarchar(255)</code> instead of <code>NVarchar(100)</code> instead of <code>NVarchar(50)</code> specially when it comes to <strong>Indexes</strong>?</p>
  
  <p>Is a shorter column size (50) better than the longer (255) in terms of performance? And can there be a special settings for such <strong>Index</strong> to improve performance?</p>
  
  <hr>
  
  <p>Here is another reference provided in the comments by @a_horse_with_no_name:</p>
  
  <p><a href="https://stackoverflow.com/questions/8295131/best-practise-for-sql-varchar-column-length">Best practices for SQL varchar column length</a></p>
  
  <p>Note answer by Ariel: <a href="https://stackoverflow.com/a/8295195/1140885">https://stackoverflow.com/a/8295195/1140885</a></p>
  
  <p>Where it says: </p>
  
  <blockquote>
    <p>"Specifically, when doing sorting, larger column do take up more
    space, so if that hurts performance, then you need to worry about it
    and make them smaller."</p>
  </blockquote>
  
  <p>, and in the comments:</p>
  
  <blockquote>
    <p>"There are issues and limitations on indexes to consider, too. You
    can't have a (a,b,c,d) index when all four columns are VARCHAR(255)"</p>
  </blockquote>
  
  <p>No definitive conclusion/reference to docs etc.</p>