Hi,
I need to use UUID as a primary key.
Initially I was going to use BINARY(16)
and generate id as UNHEX(REVERSE(REPLACE(UUID(), '-', '')))
It would work fine, but I've got a non mysql tech problem which prevents me from using binary field.
What would be another best option from performance point of view to store same compact identifier? I thought of something like decimal(38,0) or probably char(22). But I'm not sure which would be faster (and how much slower they would be compared to using binary datatype
Thanks,
Alex
I need to use UUID as a primary key.
Initially I was going to use BINARY(16)
and generate id as UNHEX(REVERSE(REPLACE(UUID(), '-', '')))
It would work fine, but I've got a non mysql tech problem which prevents me from using binary field.
What would be another best option from performance point of view to store same compact identifier? I thought of something like decimal(38,0) or probably char(22). But I'm not sure which would be faster (and how much slower they would be compared to using binary datatype
Thanks,
Alex
Comment