dotnet / dotnet/efcore

Improve our SQL Server client-generated GUIDs

Open
#33,579 19 comments 7 reactions 0 assignees View on GitHub
area-perf area-save-changes area-sqlserver customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

There's a [report](https://dev.to/connerphillis/sequential-guids-in-entity-framework-core-might-not-be-sequential-3408) that our current client-side sequential GUIDs generator for SQL Server doesn't work well for concurrent environments; #30753 was opened to consider switching to server-generated GUIDs instead, as a way of mitigating that.

However, @JackTrapper posted an analysis in https://github.com/dotnet/efcore/issues/30753#issuecomment-2027429203, according to which the issue could be mitigated by improving the client-side generation logic instead. If this indeed makes our client-generated GUIDs as indexing-efficient as server-side ones generated via [NEWSEQUENTIALID](https://learn.microsoft.com/en-us/sql/t-sql/functions/newsequentialid-transact-sql?view=sql-server-ver16), that would be a good improvement that should also maintain EF backwards compatibility.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.