CREATE TABLE `mail` (
`messageid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL,
`sender` int(10) unsigned NOT NULL DEFAULT '0',
`receiver` int(10) unsigned NOT NULL DEFAULT '0',
`type` int(10) unsigned NOT NULL DEFAULT '0',
`mail_from` varchar(200) NOT NULL,
`mail_to` varchar(200) NOT NULL,
`subject` varchar(200) NOT NULL,
`content` text NOT NULL,
`isRead` int(10) unsigned NOT NULL DEFAULT '0',
`gift` int(4) NOT NULL DEFAULT '0',
`isreward` int(4) unsigned NOT NULL DEFAULT '0',
`item` varchar(500) DEFAULT NULL,
`del` int(1) NOT NULL DEFAULT '0',
`update_at` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`messageid`),
KEY `uid` (`uid`),
KEY `del` (`del`)
) ENGINE=InnoDB AUTO_INCREMENT=87924 DEFAULT CHARSET=utf8;
慢查询sql:
select count(*) as count, type from mail where uid=112000136 and isRead = 0 and del = 0 group by type;
update mail set del = 1 WHERE `uid` = 525000022 AND type = 2 AND `subject` LIKE '2-%';
@奋进的萝卜头 @大魔导师


虽然问题已经通过删除数据解决 但是还是问下如果以后遇到这类情况的通用优化方案 提前感谢并Orz 两位大牛