版本 1.1 (17.10.30) sql慢查询

Bug,需求以及想法

版本 1.1 (17.10.30) sql慢查询

帖子ghostry » 2019年 9月 6日 15:18

代码: 全选
Count: 1  Time=14.00s (13s)  Lock=0.09s (0s)  Rows=10.0 (10),
  use blog.ghostry.cn;
  SET timestamp=N;
  SELECT DISTINCT typecho_contents.`cid` , typecho_contents.`title` , typecho_contents.`slug` , typecho_contents.`created` , typecho_contents.`authorId` , typecho_contents.`modified` , typecho_contents.`type` , typecho_contents.`status` , typecho_contents.`text` , typecho_contents.`commentsNum` , typecho_contents.`order` , typecho_contents.`template` , typecho_contents.`password` , typecho_contents.`allowComment` , typecho_contents.`allowPing` , typecho_contents.`allowFeed`  FROM typecho_contents INNER JOIN typecho_relationships ON typecho_contents.`cid` = typecho_relationships.`cid`  WHERE  (typecho_relationships.`mid` IN (N,N,N,N) ) AND (typecho_contents.`cid` <> 'S' ) AND (typecho_contents.`status` = 'S' ) AND (typecho_contents.`password` IS NULL ) AND (typecho_contents.`created` < 'S' ) AND (typecho_contents.`type` = 'S' ) ORDER BY typecho_contents.`created`  DESC LIMIT N;
  mysqld, Version: N.N.N-log (MySQL Community Server (GPL)). started with:
  mysqld, Version: N.N.N-log (MySQL Community Server (GPL)). started with:
  mysqld, Version: N.N.N-log (MySQL Community Server (GPL)). started with:

Count: 2  Time=6.90s (13s)  Lock=0.09s (0s)  Rows=8.5 (17),
  SELECT DISTINCT typecho_contents.`cid` , typecho_contents.`title` , typecho_contents.`slug` , typecho_contents.`created` , typecho_contents.`authorId` , typecho_contents.`modified` , typecho_contents.`type` , typecho_contents.`status` , typecho_contents.`text` , typecho_contents.`commentsNum` , typecho_contents.`order` , typecho_contents.`template` , typecho_contents.`password` , typecho_contents.`allowComment` , typecho_contents.`allowPing` , typecho_contents.`allowFeed`  FROM typecho_contents INNER JOIN typecho_relationships ON typecho_contents.`cid` = typecho_relationships.`cid`  WHERE  (typecho_relationships.`mid` IN (N) ) AND (typecho_contents.`cid` <> 'S' ) AND (typecho_contents.`status` = 'S' ) AND (typecho_contents.`password` IS NULL ) AND (typecho_contents.`created` < 'S' ) AND (typecho_contents.`type` = 'S' ) ORDER BY typecho_contents.`created`  DESC LIMIT N
头像
ghostry
 
帖子: 7
注册: 2012年 12月 4日 09:55

回到 反馈及建议

在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客