November 13, 2005 at 3:39 am
Hello,
What are the performance tradeoffs (If any) of using nvarchar(4000) even if my data for this column is only 100 unicode characters long?
Thanks
November 13, 2005 at 10:21 am
practically nothing, sql server only stores the 100 unicode characters
November 14, 2005 at 6:21 am
But you have a performance drawback due to the Unicode storage of 2 bytes instead of 1. It means that you need twice as much storage space as for a "simple" varchar column
Bye
Gabor
November 14, 2005 at 8:35 am
I need it to support unicode characters...
The question is if for short strings nvarchar(100) will have the same performance or better?
Thanks
November 14, 2005 at 10:03 am
The same.
Only when each record will have a recordlength of 100 you can consider nchar
November 14, 2005 at 10:13 am
could it cause an issue with space allocated in temp db/memory etc. when running queries etc, vaguely remember this being a preformance issue in 6.5?? Presumably if you allocate x bytes for a string, SQL server needs to allocate this ammount of space when returning the data in memory, dont think it will allocate it dynamically?? btw if you do an index on this column it will probably be very large!
Phil Nicholas
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply