News for hackers. Stuff that matters.
Re:You'll regret using natural keys by scrollaway on Wednesday June 05, 2024 @07:32AM (#40583684)
I don’t recommend using random bytes for this. What I have done in my previous projects is take a uuid6, reserve a couple of bytes inside of it to replace with an object ID, and I convert that to obj_XXXXXXX.

This means you can store them in the db not as a string but as a uuid, which is a lot more performant. You also get time stamping for free.

There are no comments on this comment yet.