Replace WHERE IN with join.