This is a discussion on UUID() / GUID Storage and Indexing within the MySQL Database forums, part of the Database Forums category; It seems the most compact way to store a UUID is to do the following into a BINARY(16): UNHEX(...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
It seems the most compact way to store a UUID is to do the following
into a BINARY(16): UNHEX(REPLACE(UUID(), '-', '')) If this is the be the primary key, would it be better for index fragmentation to do the following: UNHEX(REVERSE(REPLACE(UUID(), '-', ''))) instead so that the inserts are at least in order? |