newid() vs newsequentialid() What are the differences/pros and cons?

Viewed 25590

In a database where all of your primary keys are GUIDs, what are the differences/implications and/or pros and cons using newid() versus newsequentialid() as the "default value or binding".

The only difference that I know of is that newid() creates a new random GUID as opposed to newsequentialid() creates a new GUID based on the last one that is in the table in an incremented fashion.

4 Answers

As I know, NEWID() generates the GUID in random order and NEWSEQUENTIALID() generates the GUID in sequential order. NEWSEQUENTIALID() can be used ONLY in default clause of a table.

Related