Use join instead of 2 queries