I've been using MySQL since 2001.
I've been a consultant for MySQL optimization.
I've developed and delivered MySQL training and conference presentations on query optimization, including interpreting the EXPLAIN output.
I've spoken to engineers who work on the MySQL query optimizer code, and asked them specifically "what does 'Using where'
mean in the EXPLAIN output?"
I have attempted to read the MySQL code myself (I do know how to read and write C code).
I still can't understand it.
My current belief is that MySQL reports 'Using where' inconsistently. Sometimes it means that the expression in a WHERE
clause must be evaluated to provide secondary filtering to examined rows after the index search has matched rows to examine.
But I believe there are cases of queries that don't fit this explanation. Other times it seems to mean only that the WHERE
clause has an expression, even if that expression is being evaluated by an index lookup.
I suspect that there are simply different code paths in the query optimizer that output 'Using where' using different criteria. But I don't have proof of that.
So now I just ignore 'Using where'. It doesn't guide me when I'm trying to optimize queries. I can't use it to inform me that the query is well-optimized or poorly-optimized.