Combined Primary Key and Auto Increment Primary Key

2006-10-03 Thread Chris White
Hi all, I had somewhat of a performance question. I have an association table with 2 unique values which will always be selected by one of the values (never by id). That said, I'm wondering which would be a better gain, having this: CREATE TABLE association_sample ( `id` INTEGER NOT NULL

Re: Combined Primary Key and Auto Increment Primary Key

2006-10-03 Thread Dan Buettner
Chris, I'd opt for the first, but with an index on each of association_id1 and association_id2. I like always having an identity column to be able to remove or update an individual entry easily. But for speed, you'll want indexes on the other columns. I would either do no multi-column indexes,

RE: Combined Primary Key and Auto Increment Primary Key

2006-10-03 Thread Jerry Schwartz
Message- From: Chris White [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 2:20 PM To: mysql@lists.mysql.com Subject: Combined Primary Key and Auto Increment Primary Key Hi all, I had somewhat of a performance question. I have an association table with 2 unique values which