List:General Discussion« Previous MessageNext Message »
From:nngau Date:April 27 2006 3:31pm
Subject:Multiple primary keys
View as plain text  
Can someone figure out what's going on. This is the only change
I made to this table. Basically I don't want any duplicate rows, so
I setup 4 fields to be my primary key. 

When I do a simple select query it takes nearly 30 seconds to complete.
This is affecting my websites and taking a very long time to query the
Products. Have I setup this table right? Thank You!!

+---------+-------------+------+-----+---------+-------+
| Field   | Type        | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| itemID  | int(6)      |      | PRI | 0       |       |
| classA  | int(3)      |      | PRI | 0       |       |
| classB  | int(3)      |      | PRI | 0       |       |
| classC  | int(3)      |      | PRI | 0       |       |
| picture | varchar(10) | YES  |     | NULL    |       |
| sex     | char(2)     | YES  |     | NULL    |       |
+---------+-------------+------+-----+---------+-------+

Thread
Update not working in a script, but going fine running with MySQL Browserluis perez27 Apr
  • Re: Update not working in a script, but going fine running withMySQL Browsermysql27 Apr
    • Multiple primary keysnngau27 Apr
      • Re: Multiple primary keyschriswhite27 Apr
      • Re: Multiple primary keysKishore Jalleda27 Apr
        • RE: Multiple primary keysnngau27 Apr
          • Re: Multiple primary keysGordon27 Apr