请教pt-duplicate-key-checker方法,发现有部分冗余索引没提示
CREATE TABLE `topic_indicator` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`topic_id` bigint(20) NOT NULL,
`computation_day` bigint(20) NOT NULL,
`publish_at` bigint(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `topic_indicator_guid` (`topic_id`,`computation_day`),
KEY `idx_computation_day` (`computation_day`),
KEY `idx_topic_computation_publish` (`topic_id`,`computation_day`,`publish_at`)
) ENGINE=InnoDB AUTO_INCREMENT=800561 DEFAULT CHARSET=utf8;
我有一张表,表结构如上,UNIQUE KEY `topic_indicator_guid`和KEY `idx_topic_computation_publish` 索引是冗余的。
但是我用
pt-duplicate-key-checker --host=127.0.0.1 --user=root --password=123456 --port=3307
却没有提示索引冗余,而且我发现如果索引的第一个字段是主键ID,也不会报索引冗余。