Skip to content

Conversation

@OlivierBarbier
Copy link

@OlivierBarbier OlivierBarbier commented Oct 19, 2025

Thanks for the documentation reference!

I noticed the linked 2015 blog post advocates for UUIDv4, but doesn't mention the database performance implications that have become better understood since then.

UUIDv4's random nature can be detrimental to database performance: when inserted as a primary key into B-tree indexes (like MySQL InnoDB or PostgreSQL), random UUIDs can fall into any position in the index. This causes frequent page splits, index fragmentation, slower writes, and poor cache utilization.

Would you be open to recommending UUIDv7 instead? It maintains the benefits of UUIDs while avoiding these performance issues thanks to its time-ordered structure.

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