2
¿Por qué mysql usa el índice incorrecto para ordenar por consulta?
Aquí está mi tabla con ~ 10,000,000 filas de datos CREATE TABLE `votes` ( `subject_name` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `subject_id` int(11) NOT NULL, `voter_id` int(11) NOT NULL, `rate` int(11) NOT NULL, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`subject_name`,`subject_id`,`voter_id`), KEY `IDX_518B7ACFEBB4B8AD` (`voter_id`), KEY `subject_timestamp` (`subject_name`,`subject_id`,`updated_at`), KEY `voter_timestamp` (`voter_id`,`updated_at`), …