←back to thread

230 points craigkerstiens | 1 comments | | HN request time: 0.21s | source
Show context
samatman ◴[] No.42577882[source]
I maintain that people are too eager to use UUIDv7 to begin with. It's a dessert topping and a floor wax.

Let's say you need an opaque unique handle, and a timestamp, and a monotonically increasing row ID. Common enough. Do they have to be the same thing? Should they be the same thing? Because to me that sounds like three things: an autoincrementing primary key, a UUIDv4, and a nanosecond timestamp.

Is it always ok that the 'opaque' unique ID isn't opaque at all, that it's carrying around a timestamp? Will that allow correlating things which maybe you didn't want hostiles to correlate? Are you 100% sure that you'll never want, or need, to re-timestamp data without changing its global ID?

Maybe you do need these things unnormalized and conflated. Do you though? At least ask the question.

replies(3): >>42579206 #>>42581078 #>>42581841 #
1. peferron ◴[] No.42581841[source]
You can keep all three and still use UUIDv7 as a performance improvement in certain contexts due to data locality.