请教一下mysql的高手,这种频繁的慢查询有什么好办法么?
记得之前discuzX 3.4的时候就有这个现象,现在3.5问题依旧,如下:
# Time: 2024-02-24T02:00:48.433640+08:00
# User@Host: discuzX[discuzX] @ localhost [127.0.0.1] Id: 19786697
# Query_time: 4.024363 Lock_time: 0.000057 Rows_sent: 0 Rows_examined: 1
SET timestamp=1708711248;
UPDATE pre_forum_threadaddviews SET `addviews`=`addviews`+1 WHERE tid=8348981;
# Time: 2024-02-24T02:00:48.923242+08:00
# User@Host: discuzX[discuzX] @ localhost [127.0.0.1] Id: 19786730
# Query_time: 3.027535 Lock_time: 0.000045 Rows_sent: 0 Rows_examined: 1
SET timestamp=1708711248;
UPDATE pre_forum_threadaddviews SET `addviews`=`addviews`+1 WHERE tid=218363;
# Time: 2024-02-24T02:00:48.923702+08:00
# User@Host: discuzX[discuzX] @ localhost [127.0.0.1] Id: 19786703
# Query_time: 4.272790 Lock_time: 0.000055 Rows_sent: 0 Rows_examined: 1
SET timestamp=1708711248;
UPDATE pre_forum_threadaddviews SET `addviews`=`addviews`+1 WHERE tid=4060167;
还有很多行,就不全部粘贴了,主要是对这个表的频繁写入,而且这个表也不会自动清空,pre_forum_threadaddviews
discuz后台服务器优化那里打开或者关闭 “是否优化更新主题浏览量” 都无法解决。如果清空了 pre_forum_threadaddviews 这个表可能会好一会儿,也就只能好一会。
目前环境是discuzX 3.5+php7.4+nginx+mysql5.7
哪位高手能否指点一些,万分感谢!谢谢!
我知道答案 回答被采纳将会获得1 贡献 已有4人回答
# Time: 2024-02-24T02:00:48.433640+08:00
# User@Host: discuzX[discuzX] @ localhost [127.0.0.1] Id: 19786697
# Query_time: 4.024363 Lock_time: 0.000057 Rows_sent: 0 Rows_examined: 1
SET timestamp=1708711248;
UPDATE pre_forum_threadaddviews SET `addviews`=`addviews`+1 WHERE tid=8348981;
# Time: 2024-02-24T02:00:48.923242+08:00
# User@Host: discuzX[discuzX] @ localhost [127.0.0.1] Id: 19786730
# Query_time: 3.027535 Lock_time: 0.000045 Rows_sent: 0 Rows_examined: 1
SET timestamp=1708711248;
UPDATE pre_forum_threadaddviews SET `addviews`=`addviews`+1 WHERE tid=218363;
# Time: 2024-02-24T02:00:48.923702+08:00
# User@Host: discuzX[discuzX] @ localhost [127.0.0.1] Id: 19786703
# Query_time: 4.272790 Lock_time: 0.000055 Rows_sent: 0 Rows_examined: 1
SET timestamp=1708711248;
UPDATE pre_forum_threadaddviews SET `addviews`=`addviews`+1 WHERE tid=4060167;
还有很多行,就不全部粘贴了,主要是对这个表的频繁写入,而且这个表也不会自动清空,pre_forum_threadaddviews
discuz后台服务器优化那里打开或者关闭 “是否优化更新主题浏览量” 都无法解决。如果清空了 pre_forum_threadaddviews 这个表可能会好一会儿,也就只能好一会。
目前环境是discuzX 3.5+php7.4+nginx+mysql5.7
哪位高手能否指点一些,万分感谢!谢谢!
我知道答案 回答被采纳将会获得1 贡献 已有4人回答