马上注册,免费下载更多dz插件网资源。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
比如Dismall网站底部的处理时间是0.03秒左右,我们之前最快也差不多,现在变成了0.07秒左右,不知道是哪里设置没优化好还是数据库问题,已经启用Redis
另外慢查询里发现两个表的时间比较久,表是innodb引擎,请问是那里问题?- # Time: 2023-12-11T10:52:54.556741Z# User@Host: root[root] @ localhost [127.0.0.1] Id: 364698# Query_time: 4.171622 Lock_time: 0.000000 Rows_sent: 6 Rows_examined: 629667SET timestamp=1702291974;SELECT DISTINCT t.*, ti.attachment as attachmenturl, ti.remote FROM `pre_forum_thread` t INNER JOIN `pre_forum_threadimage` ti ON t.tid=ti.tid WHERE t.readperm='0' AND t.fid IN ('37','36','2') AND t.isgroup='0' AND t.displayorder>='0' ORDER BY t.dateline DESC LIMIT 0,6;# Time: 2023-12-11T10:52:55.744347Z# User@Host: root[root] @ localhost [127.0.0.1] Id: 364782# Query_time: 1.078406 Lock_time: 0.000000 Rows_sent: 6 Rows_examined: 156282SET timestamp=1702291975;SELECT DISTINCT t.*, ti.attachment as attachmenturl, ti.remote FROM `pre_forum_thread` t INNER JOIN `pre_forum_threadimage` ti ON t.tid=ti.tid WHERE t.readperm='0' AND t.fid IN ('37') AND t.isgroup='0' AND t.displayorder>='0' ORDER BY t.dateline DESC LIMIT 0,6;# Time: 2023-12-11T10:54:16.983359Z# User@Host: root[root] @ localhost [127.0.0.1] Id: 366522# Query_time: 1.254606 Lock_time: 0.000000 Rows_sent: 10 Rows_examined: 397061SET timestamp=1702292056;SELECT DISTINCT t.* FROM `pre_forum_thread` t WHERE t.readperm='0' AND t.fid IN ('82','40','41','44','43','45','63','39','87','64','51','52','88','56','48','57','59','61','60','66','67','68','70','71','72','74','76','93','79') AND t.isgroup='0' AND t.displayorder>='0' ORDER BY t.dateline DESC LIMIT 0,10;# Time: 2023-12-11T10:54:18.474966Z# User@Host: root[root] @ localhost [127.0.0.1] Id: 366548# Query_time: 1.226406 Lock_time: 0.000000 Rows_sent: 10 Rows_examined: 397061SET timestamp=1702292058;SELECT DISTINCT t.* FROM `pre_forum_thread` t WHERE t.readperm='0' AND t.fid IN ('37','36','2') AND t.special IN ('0') AND t.isgroup='0' AND t.displayorder>='0' ORDER BY t.dateline DESC LIMIT 0,10;# Time: 2023-12-11T10:56:56.033320Z# User@Host: root[root] @ localhost [127.0.0.1] Id: 369432# Query_time: 1.996411 Lock_time: 0.001000 Rows_sent: 3 Rows_examined: 397108SET timestamp=1702292216;SELECT DISTINCT t.*, ti.attachment as attachmenturl, ti.remote FROM `pre_forum_thread` t INNER JOIN `pre_forum_threadimage` ti ON t.tid=ti.tid WHERE t.readperm='0' AND t.fid IN ('48') AND t.isgroup='0' AND t.dateline >= '1701687413' AND t.displayorder>='0' ORDER BY t.recommends DESC LIMIT 0,3;# Time: 2023-12-11T10:57:06.324541Z# User@Host: root[root] @ localhost [127.0.0.1] Id: 369624# Query_time: 2.121604 Lock_time: 0.000000 Rows_sent: 3 Rows_examined: 397222SET timestamp=1702292226;SELECT DISTINCT t.*, ti.attachment as attachmenturl, ti.remote FROM `pre_forum_thread` t INNER JOIN `pre_forum_threadimage` ti ON t.tid=ti.tid WHERE t.readperm='0' AND t.fid IN ('51','52','88') AND t.isgroup='0' AND t.dateline >= '1701687424' AND t.displayorder>='0' ORDER BY t.recommends DESC LIMIT 0,3;
复制代码
我知道答案 回答被采纳将会获得1 贡献 已有0人回答
©DZ插件网所发布的一切资源仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。 网站部分内容来源于网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,得到更好的正版服务。 您在本站任何的赞助购买、下载、查阅、回复等行为等均表示接受并同意签订《DZ插件网免责声明协议》。 如有侵权请邮件与我们联系处理: discuzaddons@vip.qq.com 并出示相关证明以便删除。敬请谅解!
|
|