Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Unicode Vs ANSI

Author  Topic 

keithc1
Yak Posting Veteran

88 Posts

Posted - 2004-07-05 : 16:32:00
If I understand this properly a varchar or char field would store the value in ASCII format and an nvarchar or nchar stores it in unicode
Why then with the current advances with disk space would we really even care about the storeage of an unicode type. I beleive ASCII has to be converted to unicode for the OS kernel to process it so seems like speed would increase using a unicode set instead?


Keithc MCSE MCSA

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2004-07-05 : 22:01:13
because the unicode data also takes twice as much space on diska and in buffer cache. If your entire database is unicode and you perform a table scan or index range scan, you have to scan through all those extra blocks on disk to find your data.

Good database design dictates that you use the appropriate datatype for the data. If you are storing unicode data, or there is the possibility that you will have unicode data, then use a unicode datatype. But please, do not use a unicode datatype for every single char or varchar column in your database.



-ec
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-05 : 22:49:00
I've been in places where we've used all Unicode because everything was international. Where I currently work we don't have to worry about that, so nothing is in Unicode. There is a very drastic difference in size.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-07-06 : 05:34:34
How international does it have to be before Unicode is needed?

I can understand non-Roman alphabets, but what about the odd French accent?

If using ASCII what would a person in Italy see?

(Our systems are Web based, so the data is only ever stored by the one IIS process, but of course the data filled-in in the Web Forms is using whatever chataceristics the user's browser / OS is set to)

Kristen
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-06 : 07:40:43
Just look at the ASCII character set for what you can store Kristen. :)

http://www.asciitable.com/

It really should be Unicode if you use it for anything beyond the Latin character set.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -