-
学习元慢查询记录
普通类 -
- 支持
- 批判
- 提问
- 解释
- 补充
- 删除
-
-
陈敏
-
丁国柱
1.select logview0_.logId as logId145_, logview0_.id as id145_, logview0_.linkedURL as linkedURL145_, logview0_.time as time145_, logview0_.userId as userId145_, logview0_.operaType as operaType145_, logview0_.type as type145_, logview0_.sourceType as sourceType145_, logview0_.operate as operate145_, logview0_.newsRead as newsRead145_ from logview logview0_, evaluative_score evaluative1_ where logview0_.sourceType=1 and logview0_.id=evaluative1_.koId and evaluative1_.userId=70968 and logview0_.newsRead=0 and logview0_.time>='2012-08-17 18:05:35.0' order by logview0_.time desc;
2.SELECT S.Subj, S.Prop, S.Obj
FROM jena_g1t1_stmt S WHERE S.GraphID = 1;
3.select lcsectionu0_.id as id133_, lcsectionu0_.preSecUserId as preSecUs2_133_, lcsectionu0_.secLocation as secLocat3_133_, lcsectionu0_.preLcPageUserId as preLcPag4_133_, lcsectionu0_.koId as koId133_, lcsectionu0_.userId as userId133_, lcsectionu0_.createTime as createTime133_, lcsectionu0_.locked as locked133_, lcsectionu0_.content as content133_, lcsectionu0_.changeReason as changeR10_133_ from learningcell.lc_section_user_draft lcsectionu0_ where lcsectionu0_.userId=66695 and lcsectionu0_.preLcPageUserId=32026 and lcsectionu0_.preSecUserId=76491 and lcsectionu0_.locked<>'Y' limit 1;
-
宋杰
- select lcsectionu0_.id as id145_, lcsectionu0_.preSecUserId as preSecUs2_145_, lcsectionu0_.secLocation as secLocat3_145_, lcsectionu0_.preLcPageUserId as preLcPag4_145_, lcsectionu0_.koId as koId145_, lcsectionu0_.userId as userId145_, lcsectionu0_.createTime as createTime145_, lcsectionu0_.locked as locked145_, lcsectionu0_.content as content145_, lcsectionu0_.changeReason as changeR10_145_ from learningcell.lc_section_user_draft lcsectionu0_ where lcsectionu0_.userId=67060 and lcsectionu0_.preLcPageUserId=41188 and lcsectionu0_.preSecUserId=100955 and lcsectionu0_.locked='N' limit 1;
-
胡智杰
-
李山
查看了一下慢查询日志,mail...和koauthor...的出现比较多。找自己负责还真是要细细的看,大家发现不同的又不是自己负责的部分,可以在这里贴出来。
在网上看到这两条感觉很有用。
1.有些SQL出现在慢查询日志中,未必是其本身的性能问题,可能原因:出现锁等待,服务器当时压力非常高,InnoDB引擎表的统计信息出现严重偏差.....;
2.分析SQL语句真实的执行计划,而不是看重新执行一篇时,花费了多少时间;慢慢找吧 走起~~
----------------
有些慢查询看看是否是业务必须的,如果非必须可以先屏蔽掉。
-
唐瑶
- select count(mail0_.id) as col_0_0_ from mail mail0_ where mail0_.receiverId=67060 and mail0_.senderStatus=1 and mail0_.isNew=1;
/*[9:27:05][4664 ms]*/ ALTER TABLE `learningcell`.`mail` ADD INDEX `countMail` (`receiverId`, `senderStatus`, `isNew`);
- select distinct uploadres0_.id as id274_, uploadres0_.parentId as parentId274_, uploadres0_.isDir as isDir274_, uploadres0_.title as title274_, uploadres0_.keywords as keywords274_, uploadres0_.type as type274_, uploadres0_.description as descript7_274_, uploadres0_.filepath as filepath274_, uploadres0_.scanTimes as scanTimes274_, uploadres0_.downloadTimes as downloa10_274_, uploadres0_.uploaderId as uploaderId274_, uploadres0_.uploadTime as uploadTime274_, uploadres0_.author as author274_, uploadres0_.ischecked as ischecked274_, uploadres0_.isOpen as isOpen274_, uploadres0_.uploadResTypeId as uploadR16_274_ from uploadres uploadres0_ where uploadres0_.isOpen=1 and uploadres0_.isDir='N' and uploadres0_.ischecked=1 group by uploadres0_.title , uploadres0_.description , uploadres0_.uploaderId order by uploadres0_.uploadTime desc;
- select mail0_.id as id161_, mail0_.senderId as senderId161_, mail0_.receiverId as receiverId161_, mail0_.senderName as senderName161_, mail0_.copyName as copyName161_, mail0_.receiverName as receiver6_161_, mail0_.title as title161_, mail0_.mailSize as mailSize161_, mail0_.content as content161_, mail0_.sendTime as sendTime161_, mail0_.senderStatus as senderS11_161_, mail0_.type as type161_, mail0_.preStatus as preStatus161_, mail0_.isNew as isNew161_ from mail mail0_ where mail0_.receiverId=67060 and mail0_.senderStatus=1 and mail0_.type=1;
-
海鹏
- select koauthorre0_.id as id109_, koauthorre0_.authority as authority109_, koauthorre0_.userId as userId109_, koauthorre0_.requestInfo as requestI4_109_, koauthorre0_.status as status109_, koauthorre0_.resourceId as resourceId109_, koauthorre0_.catalogyId as catalogyId109_, koauthorre0_.ps_teachspace as ps8_109_, koauthorre0_.type as type109_, koauthorre0_.insertTime as insertTime109_ from koauthorrelation koauthorre0_ where koauthorre0_.userId=67060 and (koauthorre0_.authority=7 or koauthorre0_.authority=8) order by koauthorre0_.id desc;
-
乐乐
-
王琦
-
高梦楠
-
-
- 标签:
- 查询
- select
- 慢查询
- mail0_.receiverid
- lcsectionu0_.userid
- lcsectionu0_.presecuserid
- 学习元
- 67060
- 出现
- lcsectionu0_.prelcpageuserid
- mail0_.senderstatus
-
学习元评论 (0条)
聪明如你,不妨在这 发表你的看法与心得 ~