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 D. Zawodny, <jzawodn@stripped>
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)