| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Steve Meyers | Date: | October 23 2001 5:27pm |
| Subject: | RE: Length limit of 500 on primary keys? | ||
| View as plain text | |||
> > 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"? > In a previous message, I failed to mention one of the main reasons you would NOT want to use a 500-character primary key. MySQL uses a key buffer to keep as much index information in memory as possible. The longer the key, the less info it can keep in memory, and the more often it will have to swap to disk. If your key doesn't fit in the key buffer, my tests have shown that there is a HUGE performance loss. Steve Meyers
| Thread | ||
|---|---|---|
| • Length limit of 500 on primary keys? | Shankar Unni | 21 Oct |
| • RE: Length limit of 500 on primary keys? | Chris Bolt | 21 Oct |
| • RE: Length limit of 500 on primary keys? | Steve Meyers | 21 Oct |
| • Re: Length limit of 500 on primary keys? | Shankar Unni | 22 Oct |
| • RE: Length limit of 500 on primary keys? | Steve Meyers | 22 Oct |
| • Re: Length limit of 500 on primary keys? | Jeremy Zawodny | 23 Oct |
| • RE: Length limit of 500 on primary keys? | Steve Meyers | 23 Oct |
| • RE: Length limit of 500 on primary keys? | Steve Meyers | 23 Oct |
| • Re: Length limit of 500 on primary keys? | Shankar Unni | 24 Oct |
| • Re: Length limit of 500 on primary keys? | Bill Adams | 23 Oct |
| • RE: Length limit of 500 on primary keys? | Steve Meyers | 23 Oct |
| • RE: Length limit of 500 on primary keys? | Don Read | 23 Oct |
| • Re: Length limit of 500 on primary keys? | Dan Nelson | 24 Oct |
| • Re: Length limit of 500 on primary keys? | Heikki Tuuri | 23 Oct |
