3 ms·
If you need sorting and filtering by date, just add a timestamp to your table instead of misusing an Id column for that.
by miroljub 10mo ago
If you need sorting and filtering by date, just add a timestamp to your table instead of misusing an Id column for that.
- naasking 10mo agoExactly, be explicit, don't shoehorn multiple purposes into a single column that's supposed to be a largely meaningless unique identifier.
- mixmastamyk 10mo agoThat happens, in general. The benefit comes when it’s time to look up by uuid only; the prefix is an index to its disk block location.
- dpark 10mo ago> the prefix is an index to its disk block location What? This is definitely not the case and can’t be because B-tree nodes change while UUIDs do not.
- mixmastamyk 10mo agoI didn’t mean that literally, but no longer editable. Was supposed to have “like” etc in there.
- dpark 10mo agoBut UUIDv7 doesn’t change that at all. It doesn’t matter what flavor of UUID you choose. The ID is always “like” an index to a block in that you traverse the tree to find the node. What UUIDv7 does is improve some performance characteristics when creating new entries and potentially for caching.
- majorchord 10mo ago> just It is easy to have strong opinions about things you are sheltered from the consequences of.