表格结构:
CREATE TABLE `table` (
`ID` char(36) NOT NULL,
`Value` varchar(21000) DEFAULT NULL,
`Content` mediumblob,
`CRDateTime` datetime NOT NULL,
`Status` int(11) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID_UNIQUE` (`ID`),
KEY `Time_INDEX` (`CRDateTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
值为100 strs,Content字段为空,表有60000行
另一张表:
CREATE TABLE `table2` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID_UNIQUE` (`ID`),
UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
表有0行,它是一个空表,没有删除和更新\插入操作,只有选择
日志中的一些慢查询:
Id:14568
SET timestamp = 1484230695;
SELECT * FROM table
WHERE(ID
='aaaaaaaa')LIMIT 2;
SET timestamp = 1486821357;
选择
GroupBy1
。A1
AS C1
FROM(选择
COUNT(1)AS A1
来自table2
AS Extent1
WHERE(Extent1
。name
='24977496')AND('24977496'IS NOT NULL))AS GroupBy1
;
windows server 2008 r2 mysql 5.6.19
在高峰时,所有表查询都有此问题