I'm looking at the way UUIDs are stored in MySQL. MySQL 8 still doesn't have a UUID data type, and it still doesn't have custom types, so there are two options - store it as a string or as a binary.
Binary form saves 30% of space and performs much better, in my experience.
Unfortunately binary form is way more problematic for development/maintenance/support, since it's not readable/copyable/pasteable. To the point that it makes binary form unacceptable.
MySQL 8 has new functions that are supposed to make life with binary UUIDs a little easier, but I don't see how someone having to deal with DB on daily basis is going to happily type
BIN_TO_UUID(some_id) to display the actual ID and
UUID_TO_BIN('...') every time s/he wants to see/update some records.
I'm trying to figure out what would be the acceptable (not painful) way to deal with binary UUIDs in every day life? One way I could think of was to create an alias function, like
U(some_id), but MySQL still doesn't have global functions.
Are there any other options? Like setting up some kind of transparent filter in-between DB and client, of within a client, or something like that?