INNER JOIN ratings
ON (ratings.username = pending.username)
WHERE 'jjfjunk' = pending.username
I suspect that the cartesian join simply might not have returned before you gave up, not that it was truly an empty result set. You could leave off the WHERE condition to get a query that behaves like your original query that used a sub-query.