-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does it compare to ULID? #42
Comments
ULID requires locking if you need to use it concurrently. |
many years later, I think another major difference compare to ULID is |
IDs from the same second have a local monotonic incrementing random inited counter, so they will still sort well when generated on the same machine/process. |
According this comparison of Golang ID packages actually https://github.com/oklog/ulid also achieves fast lock-free concurrent ULID generation Besides millisecond precision, ULID also enjoys broader support due backward compatibility with UUID columns e.g. Cockroach DB has a builtin function to generate ULIDs for PKs For a distributed DB like Cockroach DB with |
For concurrency ULID requires a lock while xid uses an atomic counter as a workaround. Depending on the application, this can be a factor. Conciseness is another. |
Spec for ulid: https://github.com/ulid/spec
The text was updated successfully, but these errors were encountered: