# Data not being retrieved from index

**URL:** <https://forums.percona.com/t/data-not-being-retrieved-from-index/441>\
**Category:** Other MySQL® Questions\
**Created:** [September 7, 2007, 4:00pm UTC](https://forums.percona.com/t/data-not-being-retrieved-from-index/441 "2007-09-07T16:00:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![claudiogarcia](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@claudiogarcia](https://forums.percona.com/u/claudiogarcia)\
**Post date:** [September 7, 2007, 4:00pm UTC](https://forums.percona.com/t/data-not-being-retrieved-from-index/441/1 "2007-09-07T16:00:48Z")

</div>

Hello!

My name is Claudio Garcia and I’m new to this forum. I would appreciate your help with the following problem.

I have a table with 5 columns, all of them integers, except column C, which is type text. I have the following query:

EXPLAIN SELECT D, E FROM some\_table WHERE A = 1 AND B = 1 AND C IS NOT NULL;  
And the following index:

KEY( A, B, C(1), D, E )

The index works fine to find the rows, but I include D and E in the index so that they can be retrieved from the index instead of being read from disk.

The problem is that D and E won’t be retrieved from the index.

So MySQL can use the index to find which rows have a non-null value in C, but it cannot retrieve D and E from the index, even though they’re in it. Is this a bug in MySQL?

If I make C be an integer type, then it works as expected.

Thanks in advance!

Claudio
