2
Почему mysql использует неправильный индекс для заказа по запросу?
Вот моя таблица с ~ 10000000 строк данных 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`), CONSTRAINT `FK_518B7ACFEBB4B8AD` …