logoalt Hacker News

essephyesterday at 11:02 PM1 replyview on HN

If you can, switch to uuid v7 if you're indexing by that id. Performance improvement while still not being sequential IDs.


Replies

SahAssaryesterday at 11:16 PM

For this sort of use-case v4 might be better. It has more randomness and you will probably delete the old ids as soon as they are used anyway, so the indexed space will probably be small.