nvarchar(4000)

  • 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

     

  • practically nothing, sql server only stores the 100 unicode characters

  • 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

  • I need it to support unicode characters...

    The question is if for short strings nvarchar(100) will have the same performance or better?

    Thanks

  • The same.

    Only when each record will have a recordlength of 100 you can consider nchar

  • 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