Whatever way you cut it, the server has to scan the table -- either mysql does it quickly because you use only an index reference or it does it slowly because you require a more complicated/non-index WHERE, or slower still, as does some of the code in vB, you can get the id's, but then you then loop on them doing your fancy-schmancy criteria matching.
Geeze man, I think we can stay at the pseudo-code level at the earliest stages of discussion.

Cheers