So far, this seems doable even Badoo user search it's Badoo user search some query on huge tables 56m members The interesting part is that they also have an individual "exclude list" with every profile you look at, you can say that you don't want to meet this person.
Plus, you friends don't show up either. The second interesting part are the OR Badoo user search of the query. You can search for someone who's a woman,blonde OR brunette, non-smoker, hetero OR bisexual, virgo OR twins OR cancer, living in a 50KM radius of Paris and who is not Badoo user search friend and not on your exclude list and who's online now. Many ORs, heavy query, sort options, no way of caching or pre-calculating all this, but the search returns How do they do such a thing with 56 million datasets and K people using it at the same time?