Skip to content
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

feat: use uuid7 instead of uuid4 from now on #2309

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

winged
Copy link
Contributor

@winged winged commented Oct 16, 2024

UUID7 has the nice property of being semi-sequential, so it will be much nicer on DB indexes, and following that, improve query performance as well

Note we don't fully replace UUID4 everywhere: In tests, we don't care too much, so we don't build a UUID7 faker for those IDs, and in the Analytics module, we use UUID4 as a simple "random string" utility for generated identifiers (and using only the left few chars of it would break when using UUID7).

UUID7 has the nice property of being semi-sequential, so it will be much
nicer on DB indexes, and following that, improve query performance as well

Note we don't fully replace UUID4 everywhere: In tests, we don't care too
much, so we don't build a UUID7 faker for those IDs, and in the Analytics
module, we use UUID4 as a simple "random string" utility for generated
identifiers (and using only the left few chars of it would break when using
UUID7).
@winged
Copy link
Contributor Author

winged commented Oct 16, 2024

Further information and reasoning for UUID7 can be found here https://uuid7.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant