4 ms·
UUID is PUBLIC id, use it to look up the bigint numerical id, when necessary. one should not divulge scale, placement in numerical sequence, etc wtr to integer
by ringeryless 1y ago
UUID is PUBLIC id, use it to look up the bigint numerical id, when necessary.
one should not divulge scale, placement in numerical sequence, etc wtr to integer id, hence ouvlic UUID, which is basically unguessable token
- Jarwain 1y agoWhy have a bigint numerical ID at all?
- ringeryless 1y agofast lookup for internal usage. it's significantly faster than a UUID on every DBMS i have ever seen
- Jarwain 1y agoThat's a good reason! I think with UUIDv7, because it's sequential it's indexes are faster than UUIDv4. Still larger than bigints though. I'd like to do a benchmark at some point