My first would be to replace (NOT) IN with (NOT) EXISTS . . .