0

一部のテーブルのEXPLAINSELECTの結果は次のとおりです。

             type   possible_keys   key       Extra
table1       ref    fl              fl        Using where
table2       ref    PRIMARY,variant variant   Using where; Using index

両方のテーブルが「key」列によるインデックスを使用していることを明確にしたいのですが、table1の「Usingindex」が表示されません??? 私はこれを気にする必要がありますか?

4

2 に答える 2

1

As documented under EXPLAIN Output Format:

EXPLAIN Extra Information

The Extra column of EXPLAIN output contains additional information about how MySQL resolves the query. The following list explains the values that can appear in this column.

[ deletia ]

  • Using index

    The column information is retrieved from the table using only information in the index tree without having to do an additional seek to read the actual row. This strategy can be used when the query uses only columns that are part of a single index.

If Using index is not present, an index may still be used to locate records but then MySQL may be fetching the full record to retrieve column data.

于 2012-09-17T06:21:16.420 に答える
0

EXPLAIN EXTENDED may be helpful if you compare its output to the filtering criteria in your query: the number of rows etc.: EXPLAIN EXTENDED Output Format

于 2012-09-17T06:35:40.590 に答える