Holy crap! That took less than 1 second to return the set! Good job Sergey. Thanks!
>May be JOIN will be faster. Try
SELECT mt1.Name, mt1.ID FROM MyTable mt1 ;
> JOIN MyTable mt2 ON mt1.ID = mt2.Id AND mt2.Name == 'D'
>
>>That was the solution! Unfortunately my table has 500,000+ records and it takes almost 3 minutes to return the set. So, since that is not a viable option I'm just going to have to change the requirements. :-)
>>
>>>Jay,
>>>
>>>This should work for you.
SELECT Name, ID FROM MyTable ;
>>> WHERE id IN ( SELECT ID FROM MyTable WHERE Name == 'D')
>>>