Erik Darling notes a problem with the NOT EXISTS clause:
The difference here is specific to NOT EXISTS, though, and it has to do with join reordering.
Or rather, the lack of join reordering.
Let’s get after it.
Read on to see what this means and how it may affect your queries.