I used to have a table with about 1000W data, the primary key column's datatype is uniqueidentifier
, and the default value is Newid()
. Now there is a performance problem, and I want to change the default value to NEWSEQUENTIALID()
.
Is it possible for the GUID generated by NEWSEQUENTIALID()
to duplicate the data previously saved (previously generated by NewId()
)?
NEWSEQUENTIALID
effectively creates a Version 1 UUID.NEWID
creates a Version 4 UUID.Although
NEWSEQUENTIALID
does apply some byte scrambling, it does leave the version nybble intact. This means that there's no chance of a collision between aNEWSEQUENTIALID
created guid and aNEWID
one.