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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 NewID() can the same value output twice?

Author  Topic 

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2006-08-04 : 22:14:30
Someone brought up in one of my previous posts the argument over natural vs. surragate keys. It just made me start to wonder if the newid() function in sql 2005 could realistically ever output the same ID twice, and if so, what are the odd's? It's got to be statistically almost impossible in a real working enviorment, but I just would like t know.

Thanks

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2006-08-04 : 23:30:15
The following article answered my questions.

http://www.yafla.com/dennisforbes/To-GUID-or-not-to-GUID-In-Your-Databases/To-GUID-or-not-to-GUID-In-Your-Databases.html

It's a interesting read for developers who deal with large db's.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-08-04 : 23:44:31
thanks posting back


KH

Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2006-08-07 : 08:53:52
The article you posted was informative but nothing like this one:
http://www.yafla.com/dennisforbes/High-Performance-SQL-Server-Part-II/High-Performance-SQL-Server-Part-II.html

Allthough I knew alot of it allready he gave me some great pointers which I've never thought of before, especially the "Statistics and Bookmarks"-part...great reading!

--
Lumbago
"Real programmers don't document, if it was hard to write it should be hard to understand"
Go to Top of Page
   

- Advertisement -