联系官方销售客服
1835022288
028-61286886
服务器cpu经常到99%,经排查是mysql消耗资源太大引起的,看了mysql的慢日志,发现下面这段应该有问题,有懂的吗?看下是啥原因
SET timestamp=1649127832; SELECT * FROM `dr_1_tu` WHERE `dr_1_tu`.`id` <> 19130 AND ((`title` LIKE "%袁詠琳%" OR `keywords` LIKE "%袁詠琳%") OR (`title` LIKE "%糗事%" OR `keywords` LIKE "%糗事%") OR (`title` LIKE "%自曝%" OR `keywords` LIKE "%自曝%") OR (`title` LIKE "%袁詠琳%" OR `keywords` LIKE "%袁詠琳%") OR (`title` LIKE "%浪姐%" OR `keywords` LIKE "%浪姐%") OR (`title` LIKE "%老實人混圈太艱難%" OR `keywords` LIKE "%老實人混圈太艱難%") OR (`title` LIKE "%經紀人緊急補救%" OR `keywords` LIKE "%經紀人緊急補救%")) ORDER BY `dr_1_tu`.`updatetime` DESC LIMIT 10; # Time: 2022-04-05T03:03:52.758445Z # User@Host: xiaobaibei[xiaobaibei] @ localhost [127.0.0.1] Id: 31 # Query_time: 4.549644 Lock_time: 0.000087 Rows_sent: 10 Rows_examined: 44870 SET timestamp=1649127832; SELECT * FROM `dr_1_tu` WHERE `dr_1_tu`.`id` <> 31449 AND ((`title` LIKE "%海鳴威%" OR `keywords` LIKE "%海鳴威%")) ORDER BY `dr_1_tu`.`updatetime` DESC LIMIT 10; # Time: 2022-04-05T03:03:53.600441Z # User@Host: xiaobaibei[xiaobaibei] @ localhost [127.0.0.1] Id: 29 # Query_time: 4.906457 Lock_time: 0.000210 Rows_sent: 1 Rows_examined: 76289 SET timestamp=1649127833; SELECT * FROM `dr_1_tu` WHERE `dr_1_tu`.`id` <> 10878 AND ((`title` LIKE "%MSG-90%" OR `keywords` LIKE "%MSG-90%") OR (`title` LIKE "%軍用狙擊步槍%" OR `keywords` LIKE "%軍用狙擊步槍%")) ORDER BY `dr_1_tu`.`updatetime` DESC LIMIT 10;