0

In Oracle there is an important note in the explain plain where it says filter a.col1=... this one letting you know col1 is first retrieved from the disk and only then filter is been done. This important piece of information let you know the exact column been used within a specific index and which are filter after and may be good candidate for index.

In MySQL explain result we see something like:

+----+-------------+-------+------------+--------+--------------------+---------+-------+--------+----------+------------------------------------+
| id | select_type | table | partitions | type   | key                | key_len | ref   | rows   | filtered | Extra                              |
+----+-------------+-------+------------+--------+--------------------+---------+-------+--------+----------+------------------------------------+
|  1 | SIMPLE      | SD    | NULL       | range  | ix_store_composite | 64      | NULL  | 252978 |    60.00 | Using index condition; Using where |
+----+-------------+-------+------------+--------+--------------------+---------+-------+--------+----------+------------------------------------+

What I would like to know which of the columns data are coming from the index and which are been filtered after (the using where). I couldn't find any option to get additional detail on the explain

0

"Using index condition" does not mean the same as "Using index".

Run this:

EXPLAIN FORMAT=JSON SELECT ...

If you need further help, post that in your Question. Also show us the SELECT; it will help us go into more detail.

| improve this answer | |
  • FORMAT=JSON is what I was looking for, thanks! – Nir Jun 30 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.