Gleb Paharenko wrote:
> Dear, Michael!
>>Did you read my earlier reply? This is neither an optimizer nor > >
> I've sent my e-mail before I've read your. The problem is that I was
> testing my guessing on the table with a bit different structure than
> your (mine didn't have a primary key field 'id'). And optimizer has
> shown that it uses indexes! There is a verified bug:
> Thank you for good explanations!
I've added a comment to bug 14220 explaining why I do not believe this is a bug.
The short version is that without the id column, "SELECT *" is the same as
"SELECT vcf". In that case, the index on vcf is a covering index, so mysql
reads the data from the index, rather than the table. You will note in the
EXPLAIN output that it is still doing a full scan. It's just that it's a full
index scan rather than a full table scan.