Indexes and primary keys

wxdqz

New Member
If I have a column defined as a primary key in mysql then i dont have to create an index for it?

mysql> explain select * from testing where id='3';
+---------+-------+---------------+---------+---------+-------+------+-------+
| table | type | possible_keys | key | key_len | ref | rows | Extra |
+---------+-------+---------------+---------+---------+-------+------+-------+
| testing | const | PRIMARY | PRIMARY | 4 | const | 1 | |
+---------+-------+---------------+---------+---------+-------+------+-------+

It says that it uses some key so i dont have to define an index?

Regards Fredrik Bjurenfors
 
Back
Top