Bug #119729 Add native support for UUID v7
Submitted: 20 Jan 17:17 Modified: 21 Jan 9:27
Reporter: Vinicius Malvestio Grippa Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[20 Jan 17:17] Vinicius Malvestio Grippa
Description:
Using standard v4 UUIDs as Primary Keys in MySQL is terrible for performance because the randomness causes massive page splitting and fragmentation in the clustered index (B-Tree). UUID v7 solves this by being monotonically increasing while still being globally unique.

Currently, we have to generate these in the application layer or use messy stored procedures to hack it together. Native support would make using UUIDs as primary keys actually viable without killing insert performance.

How to repeat:
N/A

Suggested fix:
Please implement a native function, likely UUID_V7(), that generates a UUID string compliant with RFC 9562.

Ideally, this should pair well with UUID_TO_BIN so we can easily store them as BINARY(16) for maximum efficiency, preserving the sorting characteristics of the timestamp component.
[21 Jan 9:27] Roy Lyseng
Thank you for this useful feature request.