Ulid
RT.Comb
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Ulid
-
How to use performant Guid as primary keys in databases. UUID Version 7 to the rescue!
Side note, an interesting thing to add to your benchmarks would be ULID https://github.com/Cysharp/Ulid
-
New UUID Formats – IETF Draft
I’m using Postgres so I actually have it a little easier with its native sort order. I switched from NUlid that I was using from years back to this one [0], and the default .ToGuid() gets the desired sort order when used with Npgsql. Likewise though, no db-side generation of uuid - then again, isn’t that the benefit of using globally unique identifiers in the first place, to avoid needing to rely on the db to generate conflict-free identifiers, skipping HiLo or sequences, etc.
Anyway, nice to meet another .NET Ulid user in the wild!
0: https://github.com/Cysharp/Ulid
RT.Comb
-
How to use performant Guid as primary keys in databases. UUID Version 7 to the rescue!
There's a reason why, for example, this library - https://github.com/richardtallent/RT.Comb/ - uses different algorithms for PostgreSQL and for MSSQL.
-
Why should I map external IDs to internal IDs in my API?
You mention your ExternalId is a Guid, and your InternalId is an int - so unless you use Guids in your database correctly (more info, read for example RT.Comb) - Using ints for searching is much faster
What are some alternatives?
uuid6-ietf-draft - Next Generation UUID Formats
UUIDNext - A fast and modern .NET library to generate UUID/GUID that are either sequential and database friendly (versions 7), name based (versions 5) or random (version 4).
ksuid - K-Sortable Globally Unique IDs
ulid-mssql - Implementation of ULID generator For Microsoft SQL Server
uulid.go - ULID-UUID compatibility library for generating and parsing ULIDs.
Entity Framework - EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
shortuuid.rb - Convert UUIDs & numbers into space efficient and URL-safe Base62 strings, or any other alphabet.
shortuuid.go - Encode large numbers and UUIDs into space efficient strings
spec - The canonical spec for ulid
lexid - fast lexicographically orderable/sortable ID generator
NHibernate - NHibernate Object Relational Mapper