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

前端 未结 4 494
温柔的废话
温柔的废话 2020-12-08 10:23

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 va

4条回答
  •  离开以前
    2020-12-08 10:41

    From my understanding, when the SQL instance fires up the NEWSEQUENTIALID GUID is initialised to a random value. Then for the life of its operation GUIDs are incremented on the central GUID, NOT by looking at the last GUID generated for the table.

提交回复
热议问题