On 25 Jan 2002 07:05:32 +0800, [EMAIL PROTECTED] (Steven Roussey) wrote: >Does anyone have a best practices for efficiently storing md5 hash >values in MySQL? > --snip-- > >Md5 hash -- 16 bytes. >char(32) binary -- 32 bytes. >BIGINT -- 8 bytes --snip--
Or you can use base64, which uses 22 bytes per hash. What I use is the last 8 bytes of the hash and store it as a bigint. I use the hash only for collision detection, 64 bits will allow over 4 billion entries before the odds of a single incorrect collision reaches 50%. Since my total database is in the 10's of millions I have very little to worry about. Note: This reply was originally posted to mailing.database.mysql instead of this list. FVA --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php