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.
| Author |
Topic |
|
Luke101
Starting Member
30 Posts |
Posted - 2009-08-14 : 13:18:22
|
| Hello,I have been using char(36) for my GUID columns. A buddy of min told me I should use the uniqueidentifier datatype instead. Is their any difference in performce using either? |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2009-08-14 : 13:31:25
|
yes. storage for char(36) is 36 bytes, uniqueidentifier is 16 bytes.if you have joins on this column, they will work better if you use uniqueidentifier. furthermore, there is the integrity issue. you can put anything in a char(36) and sql server won't complain, for example 'zzzzzzzzzzzzzzz'. this wouldn't be allowed with uniqueidentifier. elsasoft.org |
 |
|
|
jeffreymfischer
Starting Member
10 Posts |
Posted - 2009-10-07 : 11:12:03
|
| I've written a detailed article on an enterprise-ready unique identifier solution.http://blog.scoftware.com/post/2009/08/29/SQL-Server-UniqueIdentifier-Globally-Unique-Globally-Sequential-SOLUTION.aspxRead it and provide feedback.Jeff FischerScoftware Achitect/Developerhttp://blog.scoftware.com |
 |
|
|
|
|
|