MySQL's explain's type
1 types of connection operations2(1) SYSTEM3 Const exception, when there is only one tuple match on the table4(2) CONST5When the Where condition is filtered, there is at most one tuple match on the table, such as where ID =2(the ID is the primary key, with a value of 2 or one or none)6(3) Eq_ref7 The table that participates in the join operation is the inner table (in the algorithm implemented by the code, the two tables are concatenated as the inner loop of the loop, so the table is called the inner table). 8Based on the index (a unique index or primary key index exists on the connection field, and the operator must be "="predicate, index value cannot be null) to do a scan, so that on the appearance of a tuple, the inner table only the only one by one-tuple corresponding to it. 9(4) REFTen can be used for single-table scans or connections. The table that participates in the connection operation is the inner table. OneIndex-based (the index on the connection field is a non-unique index, the operator must be "="predicate, the connection field value is not null) to do a scan, so that on the appearance of a tuple, the inner table can have a number of bars corresponding to it. A(5) Ref_or_null -Similar to ref, only search conditions include: The value of the connection field can be null, such aswhereCol =2or col is NULL -(6) RANGE theRange Scan, index-based range scan, for example between,in,>=, like operations provide support -(7) Index_scan - The index is scanned based on the index on the leaf node of the index to find the data that satisfies the condition (no need to access the data file) -(8) All + full table scan or range Scan: Do not use index, sequential scan, directly read the data on the table (Access data file) -(9) Unique_subquery + in a subquery, a scan based on a unique index, similar to Eq_ref A(Ten) Index_subquery at in a subquery, a scan is based on an index other than a unique index -( One) Index_merge - multi-range scanning. The join fields for each table connected to the two tables are indexed and indexed, and the results are merged together. Applicable to the and, the intersection operation of the set. -( A) FT -Full text, fulltext search
MySQL Crazy state