分页: 1 / 1

版本 1.1 (17.10.30) sql慢查询

帖子发表于 : 2019年 9月 6日 15:18
ghostry
代码: 全选
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