On Mon, Oct 22, 2001 at 11:42:23AM -0600, Steve Meyers wrote: > > If you use a good 64-bit hash, I doubt you'll run into any > uniqueness problems. MySQL will support that as a 64-bit BIGINT. > You especially should not have any problems if you hash each column, > then do the primary key across the four hashes. > > I'm not sure why there is a limit, but I'm also not sure why anybody > in their right mind would want a unique index that long :)
In Gemini, I think the limit is 2048 bytes (or so). It was increased to handle URLs (among other things). > At a previous job, we tested a 32-bit hash function by running it > against hundreds of thousands of unique URL's stored in our > database. We found one collision. A 64-bit hash is billions of > times better (4 billion, to be exact). Good to know. I wonder how many collisions I'd find if I ran it over every URL listed in the directory www.yahoo.com. Which 64 bit hash function did you use? Invent your own, or something "off the shelf"? Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 47 days, processed 1,025,236,716 queries (251/sec. avg) --------------------------------------------------------------------- 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