Search code examples
sqlsql-serverindexingnvarchar

implications of using nvarchar(max) with non-indexed fields


Could anyone explain the implications of storing strings into a column that is defined as nvarchar(max) instead of defining the length of say nvarchar(500)? The table would contain multiple fields and could have the potential of containing 10million+ records. These fields would also not be indexed.

Thanks!


Solution

  • It being indexed or not comes into play when you're trying to search on that data. So, if it's data that just comes along for the ride when you query on other fields, then it shouldn't be too bad. There's a little more to it (i.e. covering indexes), but that's the basic gist of it.