I have a table in mySQL where the 'id' column is the PRIMARY KEY:
CREATE TABLE `USERS` (
`ID` mediumint(9) NOT NULL auto_increment,
.....
PRIMARY KEY (`ID`),
KEY `id_index` (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=267 DEFAULT CHARSET=latin1;
I've also added an index as follows:
CREATE INDEX id_index ON USERS (id);
Did I need to do this? Or is the primary key automatically indexed?
The end aim is here is to speed up queries which join on the id column of table USERS.
Thanks