l...@tom.com writes:
> I think the id columns of table a and b are not null, so the query of "not 
> in" and "not exists" are  equal,they should use similar plans.

NOT IN and NOT EXISTS are *not* equivalent.  Per SQL standard, NOT IN
has different (and usually not very desirable) behavior with NULL
values.  The spec-mandated behavior makes it a lot harder to optimize
nicely --- and since you usually don't want what it does anyway, we
haven't tried hard.

                        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to