Length Limit

2002-05-10 Thread Edilson Vasconcelos de Melo Junior
Hi, Using the C API, does the sql parameter in the mysql_query function a length limit? Thank u very much, Edilson. Edilson Vasconcelos de Melo Junior www.jrsoftwares.com.br [EMAIL PROTECTED] Fone: (19) 3256-3577 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

RE: Length Limit

2002-05-10 Thread Kenneth Hylton
[mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 3:41 PM To: MYSQL Subject: Length Limit Hi, Using the C API, does the sql parameter in the mysql_query function a length limit? Thank u very much, Edilson. Edilson Vasconcelos de Melo Junior www.jrsoftwares.com.br [EMAIL PROTECTED] Fone: (19

Re: Length limit of 500 on primary keys?

2001-10-24 Thread Dan Nelson
In the last episode (Oct 23), Jeremy Zawodny said: 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

Re: Length limit of 500 on primary keys?

2001-10-24 Thread Shankar Unni
Steve Meyers wrote: 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

Re: Length limit of 500 on primary keys?

2001-10-23 Thread Jeremy Zawodny
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

RE: Length limit of 500 on primary keys?

2001-10-23 Thread Steve Meyers
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

RE: Length limit of 500 on primary keys?

2001-10-23 Thread Steve Meyers
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

Re: Length limit of 500 on primary keys?

2001-10-23 Thread Bill Adams
Steve Meyers wrote: 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

RE: Length limit of 500 on primary keys?

2001-10-23 Thread Steve Meyers
I am not understanding why having a hash and the full url in the database would not take care of the collisions. Even if you had 10 collisions for a 16 bit hash (say), if your query was: SELECT ... WHERE hash=thehashvalue AND url='theurl' you would get very fast lookups on the hash and

Re: Length limit of 500 on primary keys?

2001-10-23 Thread Heikki Tuuri
Hi! I changed now ha_innobase.h so that InnoDB allows keys up to 7000 bytes in length. The change will be in MySQL-3.23.44 and 4.0.1. Regards, Heikki http://www.innodb.com Steve Meyers wrote: At a previous job, we tested a 32-bit hash function by running it against hundreds of

RE: Length limit of 500 on primary keys?

2001-10-23 Thread Don Read
On 23-Oct-2001 Steve Meyers wrote: 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

Re: Length limit of 500 on primary keys?

2001-10-22 Thread Shankar Unni
Steve Meyers wrote: The problem is that he has it as a primary key, so he wants it to be unique as well as indexed. The best solution (and MUCH MUCH MUCH more efficient) would be to hash each of the four columns, and create a primary key on that. Integer keys are much faster and

RE: Length limit of 500 on primary keys?

2001-10-22 Thread Steve Meyers
The problem is that he has it as a primary key, so he wants it to be unique as well as indexed. The best solution (and MUCH MUCH MUCH more efficient) would be to hash each of the four columns, and create a primary key on that. Integer keys are much faster and memory- efficient

RE: Length limit of 500 on primary keys?

2001-10-21 Thread Steve Meyers
keys. Steve Meyers -Original Message- From: Chris Bolt [mailto:[EMAIL PROTECTED]] Sent: Saturday, October 20, 2001 8:31 PM To: [EMAIL PROTECTED] Subject: RE: Length limit of 500 on primary keys? Is there a way to raise this limit? We have some tables with columns

Length limit of 500 on primary keys?

2001-10-20 Thread Shankar Unni
Why is there a limit of 500 bytes on the primary key? (MySQL-Max-3.23.43 on WinNT). Is there a way to raise this limit? We have some tables with columns that are VARCHAR(200), and need to make a primary key based on combinations of these columns (in some cases, upto 4 columns), and MySQL

RE: Length limit of 500 on primary keys?

2001-10-20 Thread Chris Bolt
Is there a way to raise this limit? We have some tables with columns that are VARCHAR(200), and need to make a primary key based on combinations of these columns (in some cases, upto 4 columns), and MySQL complains for all of these table definitions that Specified key was too long. Max key