May 8, 2009 at 5:54 am
Based on the extensive experience from the guys on this forum, have you found it better to use varchar or nvarchar.
I know varchar is faster but has limitations with some foreign characters.
Since space is cheap is it better to use nvarchar and forget about it, or go for the extra performance of varchar ?
Thanks
May 8, 2009 at 6:11 am
Its not the experience or the performance factor that decides the usage of data types but the business factors decides. If the business rule requires support for UNICODE (i.e. nvarchar) data then you must use the nvarchar datatype otherwise you can stick to the general varchar data types.
--Ramesh
May 8, 2009 at 8:01 am
Only use nvarchar if you are absolutely going to be using the extended character sets. If you're just using some of the ascii characters with umlauts or whatever, you just won't need it.
Remember, it's not just storage, it's the b-tree structures in the indexes that you have to worry about too.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 8, 2009 at 8:06 am
Well I suggest all depends on your business requirement, if you business supports multi language the you should go with NVARCHAR.(I guess you have the knowledge of difference between VARCHAR and NVARCHAR datatype 🙂 the core difference is the space) the main thing is specifying the length for the same :-D.
Abhijit - http://abhijitmore.wordpress.com
May 8, 2009 at 8:14 am
ifila (5/8/2009)Since space is cheap is it better to use nvarchar and forget about it
... depending of the scale that statement might not hold true; imagine you have a 4 TB data warehouse - would you still forget-about-it?
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply