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`.
*Assuming* it is using `INDEX(a,b,c,d)`, that is better than scanning the entire table, but not as good as using

```
INDEX(b,c,d) -- in any order

```

With (a,b,c,d) it needs to read, then not count, rows without the matching b,c,d.

With (b,c,d) or (b,c,d,a), all the rows to count are adjacent in the index. Furthermore, no unnecessary rows need skipping.