XP is just a number | |
PerlMonks |
Re^2: Question: methods to transfer a long hexadicimal into shorter stringby lihao (Monk) |
on Aug 07, 2009 at 21:16 UTC ( [id://786937]=note: print w/replies, xml ) | Need Help?? |
Thank everyone for the reply Let me explain more about my project. I have 20M email listing (saved in MySQL) which we want to track in our campaigns. So instead of using original emails on the related URLs, we want to use IDs. 20-byte hexadecimal is good enough for uniqueness of 20M emails. While I am trying to find better options, i.e., if we can use shorter ID, we can significantly reduce the table size and there are more benefit from doing so... For testing purpose, I used 3M emails and 8-byte ID and Digest::SHA1 and Convert::zBase32 to build the IDs
I was hoping the second one could at least give me better uniqueness. but the result is: I got 773 duplicated IDs from setid_1 and 676131 duplicated IDs from setid_2. Any better way to handle such issue? thanks again lihao
In Section
Seekers of Perl Wisdom
|
|