Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL 中 EXPLAIN 命令详解 - overtrue #23

Open
overtrue opened this issue May 4, 2018 · 7 comments
Open

MySQL 中 EXPLAIN 命令详解 - overtrue #23

overtrue opened this issue May 4, 2018 · 7 comments

Comments

@overtrue
Copy link
Owner

overtrue commented May 4, 2018

https://overtrue.me/articles/2014/10/mysql-explain.html

EXPLAIN 显示了 MySQL 如何使用索引来处理 SELECT 语句以及连接表。可以帮助选择更好的索引和写出更优化的查询语句。 使用方法,在 select 语句前加上EXPLAIN就可以了: 如: EXPLAIN SELECT surname,first_name FORM a,b WHERE a.id=b.id EXPLAIN列的解释: 列 描述 table 显示这一行的数据是关于哪张表的。 type 这是重要的列,显示连接使用了何种类型。从最好到最差的连接类型为 const、eq_reg、ref、range、index和ALL。 possible...

@chaitd
Copy link

chaitd commented May 11, 2018

翻译得什么呀?贴个原文链接多好

@overtrue
Copy link
Owner Author

@chaitd
翻译得什么呀?贴个原文链接多好

sorry, 从很早的笔记里找到的,我也不晓得从哪里来的,翻译的不好,还请大佬多多指教,谢谢!

@chaitd
Copy link

chaitd commented May 16, 2018

https://dev.mysql.com/doc/refman/5.5/en/explain-output.html 英文参考

@medz
Copy link

medz commented May 24, 2018

@StopTheword
Copy link

超哥,列 type 中的连接类型是eq_ref还是eq_reg?

@overtrue
Copy link
Owner Author

overtrue commented Sep 8, 2018

@StopTheword
超哥,列 type 中的连接类型是eq_ref还是eq_reg?

应该是 eq_ref

@skyler0513
Copy link

skyler0513 commented Oct 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants