Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the function of the EXPLAIN command in MySQL

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

What is the role of the EXPLAIN command in MySQL, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

The sequence number of the ID SELECT command (usually 1, and subqueries often start with the sequence number 2)

Select_type

SIMPLE simple SELECT command

The outermost SELECT command of PRIMARY

UNION SELECT commands connected by UNION statements

DEPENDENT UNION SELECT commands connected by UNION statements (dependent on external queries)

SELECT command in SUBQUERY subquery

SELECT commands in DEPENDENT SUBQUERY subqueries (dependent on external queries)

DERIVED derived tables (subqueries of FROM statements)

Table table name

Type

The connection type of the table (sorted by efficiency)

System has a table with only one record (= system table)

Const constant, with an index restricted by PRIMARY KEY/UNIQUE (the result is always 1 row)

Equivalent query made by PRIMARY KEY/UNIQUE column when eq_ref is connected

Equivalent query for ref non-UNIQUE columns

The search of [~ OR column name IS NULL] is added to ref_or_null ref.

Range uses the index to check a range of records (=, >, > =

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report