4 ms·
An alternative that was posted here a week or so ago: https://eager.io/blog/how-long-does-an-id-need-to-be/ https://eager.io/blog/how-long-does-an-id-need-to-be
by elmin 12y ago
An alternative that was posted here a week or so ago: https://eager.io/blog/how-long-does-an-id-need-to-be/ https://eager.io/blog/how-long-does-an-id-need-to-be/
- klodolph 12y agoOr you could just use type 4 UUIDs. We know 64 bits is likely too small, and 128 bits is likely enough. Why bother saving a few bits here and there, if you already have a working solution?
- zackbloom 12y agoThe example in the post is because full UUIDs are uncomfortably long for URLs, and have more entropy than is necessary for the application in question.
- girvo 12y agoFor unique IDs in databases, you want them to have common prefixes such that they are kept in rough time order in the database's backend, otherwise your indexes can end up huge and degrade performance (especially in MySQL, that's where we got bitten by it). That's where Type 1s are great, but of course this article shows a major downside.