Re: NOT IN vs. NOT EXISTS performance

2018-11-08 Thread David Rowley
On 9 November 2018 at 08:35, Lincoln Swaine-Moore wrote: > My primary question is: why is this approach only possible (for data too > large for memory) when using NOT EXISTS, and not when using NOT IN? > > I understand that there is a slight difference in the meaning of the two > expressions, in

NOT IN vs. NOT EXISTS performance

2018-11-08 Thread Lincoln Swaine-Moore
Hi all, I've figured out how to solve the performance issues I've been encountering with a particular query, but I'm interested in better understanding the intuition behind why the better query is so much more performant. The query in question involves a NOT IN filter from a CTE: WITH temp as (