3 ms·
You lose security/privacy benefits. People in this thread pretend that there is one id type that is obviously better. - UUID (all types) scale, sequential ids
by esailija 4y ago
You lose security/privacy benefits. People in this thread pretend that there is one id type that is obviously better.
- UUID (all types) scale, sequential ids don't scale
- UUID (fully random) is completely secure and private. You cannot infer anything from it. As soon as you add anything to it ( like timestamp or counter), outsiders can infer things like how fast you are generating new objects
- UUID (fully random) cannot be abused by developers, which might skip creating timestamp columns and read it from the id instead
- UUIDs are slower, but as you see y's not for no benefits
- ttfkam 4y agoNot that much slower than bigint as long as you replace the top one or two bytes in the UUID with a rotating per-minute counter. You keep 106 bits of entropy (from v4's 122 bits) while largely eliminating page faults. Walkability is eliminated while not leaking too much temporal info. https://www.2ndquadrant.com/en/blog/sequential-uuid-generators/ https://www.2ndquadrant.com/en/blog/sequential-uuid-generato...
- srcreigh 4y agohttps://youtu.be/b2F-DItXtZs https://youtu.be/b2F-DItXtZs