For example, we have a table:
CREATE TABLE `my_tbl` ( `id` int(11) NOT NULL AUTO_INCREMENT, `id_type` int(11) NOT NULL, `date` date NOT NULL, `other_fields` varchar(200) CHARACTER SET latin1 NOT NULL, PRIMARY KEY (`id`), KEY `id_type` (`id_type`), KEY `type_date` (`id_type`,`date`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8
Ther are two indexes: id_type and id_type, date .
As I know, if we have an index with two fields, we use it as a single index of the first field.
Is it possible to remove the id_type index without losing performance?
UPDATE: asking this question, you noticed that once the same field in different indices has different power.
source share