I'm auditing the schema of a MySQL database used by a off-the-shelf e-commerce application and I found this as output of
SHOW CREATE TABLE thistable:
CREATE TABLE `thistable` ( `case_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `company_id` int(11) NOT NULL DEFAULT '0', (...) `timestamp` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`case_id`), KEY `idx_case_id` (`case_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=21688281 DEFAULT CHARSET=utf8
It explicitly adds an index on a primary key.
Is this a blunder of the database designer, or is there actually a reason why is that?
It is worth noting that this table was MyISAM in origin.