I have an inquiry like this
SELECT destinationCode
FROM destinations
WHERE destinationCode NOT IN (
SELECT DISTINCT(destinationCode) FROM hotels
);
Which is absurdly slow.
I read that mysql evaluates the IN subquery for each row.
How do you think of refactoring this? I do not see it with inner joins