2

Possible Duplicate:
overstating field size in database design

I have a "description" column in one of my tables which as of now I dont know the maximum size of. But I am assuming it should not be greater than 1000 characters.

Question: If I make it nvarchar(4000) [just to be safe] will it have any adverse impact on performance ?

Thanks.

Community
  • 1
  • 1
stackoverflowuser
  • 22,212
  • 29
  • 67
  • 92

1 Answers1

3

No. NVARCHAR(1000) has all the exact characteristics as NVARCHAR(4000). As a variable length column it takes only the space it needs, it can be pushed out-of-row if it does not fit in page and so on and so forth.

On a related note, if you'd use NVARCHAR(MAX) then you could experience some degradation, usually not noticeable though, see Performance comparison of varchar(max) vs. varchar(N). Also a MAX type would prevent online rebuild and index operations.

Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569
  • 1
    Can you repost this on the linked question? I think it would be great to have this info there – JNK Aug 22 '11 at 18:50