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

Switch from UUIDv4 to NanoID #71

Merged
merged 5 commits into from
Oct 17, 2024
Merged

Switch from UUIDv4 to NanoID #71

merged 5 commits into from
Oct 17, 2024

Conversation

VVoruganti
Copy link
Collaborator

Overview

There have been several articles discussing the performance detriments that uuid4 present when they are used as the primary key. These include being difficult to index, slowing down insert operations, and not being URL friendly.

There have also been concerns about API routes becoming very large due to the nested objects in Honcho. To address these concerns we are using a int8 auto-incrementing value for the primary key of the database tables and then exposing a public_id value that maps to a NanoID

The end user has no concept of the internal ID at all and it is purely used for internal tracking and performance

Sources

Tracking

Fixes dev-402
Contains changes for dev-435

@VVoruganti VVoruganti changed the title Switch from uuid to nanoid Switch from UUIDv4 to NanoID Oct 16, 2024
@VVoruganti VVoruganti requested a review from bLopata October 16, 2024 21:28
Copy link

@bLopata bLopata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@VVoruganti VVoruganti merged commit 6d5439a into main Oct 17, 2024
3 checks passed
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.

2 participants