Thanks. So when they say Facebook messages use NoSQL, how do they show you all messages WHERE recipient=you if these queries are expensive?
However, to answer your question, what you could do is keep another entry in the table where the key is the user id and the value is a vector of all the messages sent to that user id.