MySQLexplain introduction of select_type

select_type:

Data read operation type of operation, type of query, the query is mainly used to distinguish between normal, combined query, the query complexity subqueries

Mainly the following categories:

  1. SIMPLE: simple select query, the query does not contain subqueries or UNION

  2. PRIMARY: If the query contains any complex sub-section, the outermost query were marked

  3. SUBQUERY: contains a subquery in the SELECT list or WHERE

  4. DERIVED: FROM subquery contained in the list is marked DERIVED (derivative) MYSQL recursively execute these sub-queries, the results in a temporary table

  5. UNION: If after the second SELECT appears UNION, were labeled UNION UNION if included in the FROM clause of a query, the outer layer is labeled SELECT: DERIVED

  6. UNION RESULT: get results from UNION SELECT table
    Here Insert Picture Description

Published 217 original articles · won 125 Like · views 10000 +

Guess you like

Origin blog.csdn.net/qq_39885372/article/details/104173941
Recommended