Skip to content

Reconsider our default GUID generation strategy #30753

@roji

Description

@roji

We currently generate GUIDs on the client by default; on SQL Server, we use SequentialGuidValueGenerator, which works similarly to the SQL Server NEWSEQUENTIALID. Sequential GUIDs reduce index fragmentation (important for good performance), and generating them on the client reduces network roundtrips by allowing principal with GUID keys to be inserted in the same batch with dependents pointing to them.

However, there's a pretty reliable-looking report that in parallel environments, our cilent-generated GUIDs do lead to high index fragmentation due to various jitter factors, causing values not to be inserted in order (see previous perf investigation but which was serial only). We should try reproducing this; if this is the case, we should consider switching to server-generated GUIDs by default (with NEWSEQUENTIALID) - the importance of good, non-fragmented indexes is likely to far overweigh the extra roundtrips at insertion with dependents.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions