MySQL 使用explain查看执行计划
生活随笔
收集整理的這篇文章主要介紹了
MySQL 使用explain查看执行计划
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
使用explain查看執行計劃, 下面是針對這兩條語句進行分析,其查詢結果是一樣的。
EXPLAIN select n.id,n.title from info n inner join info_tags t on n.id=t.info_id where t.category_id=20 order by id desc limit 8;
EXPLAIN select n.id,n.title from info n inner join (select info_id as id from info_tags t where t.category_id=20 order by id desc limit 8) as page USING(id);
?
第一條語句結果:
?
第二條語句結果
?
具體參數分析請點擊下面鏈接:
http://blog.csdn.net/c_enhui/article/details/9021271
轉載于:https://www.cnblogs.com/weiok/p/5121487.html
總結
以上是生活随笔為你收集整理的MySQL 使用explain查看执行计划的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Git版本服务器搭建(CentOS)--
- 下一篇: Linux-PAM PAM-MySQL