I have a table service_message that contains about 600000 pieces of data, which records when different devices receive messages:
SHOW CREATE TABLE service_message
CREATE TABLE `service_message` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`device_id` INT(11) NOT NULL COMMENT "Id",
`property_id` INT(11) NOT NULL COMMENT "Id",
`value` TEXT NOT NULL COMMENT "",
`time` DATETIME NOT NULL COMMENT "",
PRIMARY KEY (`id`),
KEY `device_id` (`device_id`),
KEY `time` (`time`),
KEY `property_id` (`property_id`)
) ENGINE=INNODB AUTO_INCREMENT=844512 DEFAULT CHARSET=utf8
idsql:
3~4
explain
:
so. My question is, is there any way to optimize it?