[摘要]+------------------------+-------+开启profile:开启profile之后,执行要分析的sql语句:mysql> select t1.*,t2.action...
+------------------------+-------+开启profile: 开启profile之后,执行要分析的sql语句: mysql> select t1.*,t2.action from div_forum_thread as t1
left join
(select a.* from div_forum_threadmod as a,(select tid,max(dateline) as dateline from div_forum_threadmod group by tid) as b
where a.tid=b.tid and a.dateline=b.dateline) as t2
on t1.tid=t2.tid
where t1.displayorder>=0 and t1.fid in (47,49) and t1.tid > 100318
and (t1.authorid =7683017 or t2.action<>'DWN' or t2.action is null )
order by t1.dateline desc limit 20; 查看生成的profile信息: mysql> show profiles;
+----------+------------+--------------------------------------------------------------------------------------------------------+
|
关键词: Mysql调优之profile的运用办法