logoalt Hacker News

miroljublast Monday at 3:24 PM3 repliesview on HN

If you need sorting and filtering by date, just add a timestamp to your table instead of misusing an Id column for that.


Replies

mixmastamyklast Monday at 4:36 PM

That 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.

show 1 reply
majorchordlast Monday at 4:38 PM

> just

It is easy to have strong opinions about things you are sheltered from the consequences of.

naaskinglast Monday at 4:26 PM

Exactly, be explicit, don't shoehorn multiple purposes into a single column that's supposed to be a largely meaningless unique identifier.