Live data from Hacker News

UUIDs are popular, but bad for performance (2019)

percona.com

201–210 of 246 posts

Re: UUIDs are popular, but bad for performance (2019)

#201
post #152
post #133

I recently read a book by Google’s head guy on API design that was specifically about designing APIs and it had a big section on what makes a good identifier and why people reach for UUIDs and why specifically it is a problem on multiple levels. The thing that he ended up recommending however was super interesting in that I had never seen it mentioned before but it was basically to use this instead http://www.crockfo…

Would you happen to have a link to the book?

https://www.manning.com/books/api-design-patterns

Re: UUIDs are popular, but bad for performance (2019)

#202
post #193

Earlier quoted context omitted.

People in my industry in my country has specifically avoid using B and D together as they sound too similar over the phone. Also 2 and Z can be similar in writing. However it is nice to not see 0 and O, 1,I,l in the same string.

You still have to know that 0 is 0 and not O, and that 1 is 1 and not I or l.

but if mistake is made, and you wrote down L instead of 1, and sent me in a e-mail. I, knowing that it is crockford 32, would easily deduce what mistake was made.

Re: UUIDs are popular, but bad for performance (2019)

#204
post #179

Earlier quoted context omitted.

People in my industry in my country has specifically avoid using B and D together as they sound too similar over the phone. Also 2 and Z can be similar in writing. However it is nice to not see 0 and O, 1,I,l in the same string.

If you're worried about clarity over the phone, you should look into the NATO phonetic alphabet: https://en.wikipedia.org/wiki/NATO_phonetic_alphabet

I prefer to use Aeon, Bdellium, Czar, Djinn, Eye, etc.

Re: UUIDs are popular, but bad for performance (2019)

#205

Earlier quoted context omitted.

I never understood why people would use sequential UUIDs. That rather defeats the purpose of a UUID. If you need something sequential then just use a much more simple number

Because simple integers are not universally unique, a major feature of UUIDs…

Is this sarcasm? If you generate an incrementing-UUID then its predictability is going to make it not-universally unique too

Re: UUIDs are popular, but bad for performance (2019)

#206

Earlier quoted context omitted.

Because simple integers are not universally unique, a major feature of UUIDs…

Is this sarcasm? If you generate an incrementing-UUID then its predictability is going to make it not-universally unique too

That is…not what universally unique means.

Re: UUIDs are popular, but bad for performance (2019)

#207
post #133

I recently read a book by Google’s head guy on API design that was specifically about designing APIs and it had a big section on what makes a good identifier and why people reach for UUIDs and why specifically it is a problem on multiple levels. The thing that he ended up recommending however was super interesting in that I had never seen it mentioned before but it was basically to use this instead http://www.crockfo…

Oh wow thanks! I was familiar with Zimmerman's base 32, (z-base-32, https://philzimmermann.com/docs/human-oriented-base-32-encod...) but not Crockford's.

I just added it to the "Other projects" section of my base converter. https://convert.zamicol.com/

Re: UUIDs are popular, but bad for performance (2019)

#208

Earlier quoted context omitted.

I never understood why people would use sequential UUIDs. That rather defeats the purpose of a UUID. If you need something sequential then just use a much more simple number

Because simple integers are not universally unique, a major feature of UUIDs…

UUIDs are integers, they just happen to be 128 bits long instead of the more common 32 or 64, and they are usually printed in a specific way that differs from how integers are usually printed. But that's just smoke and mirrors.

UUIDs are generally not guaranteed to be universally unique. The name is misleading marketing.

If you generate them randomly, then the probability of collision is small enough not to matter, but the more you introduce deterministic elements, like generating them sequentially, the more your probability of collision increases.

Re: UUIDs are popular, but bad for performance (2019)

#209

Earlier quoted context omitted.

Because simple integers are not universally unique, a major feature of UUIDs…

Is this sarcasm? If you generate an incrementing-UUID then its predictability is going to make it not-universally unique too

No. Incrementing an integer might be unique for the local database, but not unique for the universe.

Re: UUIDs are popular, but bad for performance (2019)

#210

Earlier quoted context omitted.

Is this sarcasm? If you generate an incrementing-UUID then its predictability is going to make it not-universally unique too

That is…not what universally unique means.

From RFC4122: "A UUID is an identifier that is unique across both space and time, with respect to the space of all UUIDs."

Hard to achieve if everyone starts from 00000000-0000-0000-0000-000000000000.

Post reply on HN