Hi,
Postgres optimizer automatically tries to convert an IN clause to Hash Join (something similar to EXISTS equivalent of that query).
Does a similar translation happen for NOT IN as well? Given that the column used is NOT NUL.
Select * from emp where deptid not in (select deptid from dept where deptLocation='New York');
Will this above statement be automatically converted to a plan which would match below statement?
Select * from emp where not exists (select 1 from dept where deptLocation='New York' and dept.deptid=emp.deptid);
Regards
Sameer
PS: Sent from my Mobile device. Pls ignore typo n abb