3 ms·
UUIDs are Popular, but Bad for Performance (2019)
- PaulHoule 5y agoIt is not worth fighting the UUID. It gives distributed systems wings. The UUID accomplishes one goal the semantic web promised, which is being able to union two arbitrary databases, not have identifier collisions, and start writing queries. It's proven more reliable to hypnotize management and developers into using a formula like uuid4() than to get them to properly make URIs by skolemization. Granted you have no idea that I call my camera 'b16bd4af-b2d6-45a9-86ae-f34e47083d3c' and the 90mm macro lens is '4a3a9a41-bb5c-4e56-bde8-51a8e95e3073'. Even I have to look those up in a table. A major result from Doug Lenat's cyc project was that any system of coining identifiers from names will break down as scale increases. You're best off starting with arbitrary identifiers (sequential int or uuid) and building tooling to map them them to and from concepts in people's minds.
- garbagecoder 5y agoWorse is better
- emrah 5y ago> Integer values are compared up to 8 bytes at a time by the CPU but UUID values are compared char per char. Well nothing prevents one from storing the UUID as an integer. And one doesn't have to use the uuid() function provided by the database either which may only generate a textual UUID.