Question: Let's say we only have an index idx\_abcd, which is (A, B, C, D). There are approximately 30 million rows.

We now have a query

```
SELECT COUNT(*)
FROM tableName
WHERE B = ? AND C = ? AND D = ?;

```

The `EXPLAIN` statement of the above query shows the following useful data:

* type: index
* key: idx\_abcd
* rows: ~30 million
* ref: null
* filtered: 0.1
* Extra: Using where; Using index

The `WHERE` condition does not follow the left-most principle, but the `EXPLAIN` shows the DB does use the index.

Could it be possible?

The version of MySQL is 5.7. The Engine is InnoDB.

Answer: 
One possible explanation here is that MySQL has found that scanning (*not* seeking) the `idx_abcd` index is, for whatever reason, faster than just scanning the clustered index of your table. For this reason, it is choosing to use the index. Note that the "left-most principle," as you have described it, is not happening here. That is, because your index starts with the `A` column, it doesn't really help with the `WHERE` clause, which admits any value of `A`.
the select column is count(\*)，and the where columns are contained by index\_abcd，so there is no need to back to table to fetch other data。

keyword: coverd index