Re: *very* inefficient choice made by the planner (regarding - Mailing list pgsql-performance

From Tom Lane
Subject Re: *very* inefficient choice made by the planner (regarding
Date
Msg-id 25304.1086883145@sss.pgh.pa.us
Whole thread Raw
In response to Re: *very* inefficient choice made by the planner (regarding  (Jean-Luc Lachance <jllachan@sympatico.ca>)
Responses Re: *very* inefficient choice made by the planner (regarding  (Jean-Luc Lachance <jllachan@sympatico.ca>)
List pgsql-performance
Jean-Luc Lachance <jllachan@sympatico.ca> writes:
> If the two statments are functionally equivalent, why can't PG rewrite
> the "NOT IN" version into the more efficient "NOT EXISTS"?

They're not equivalent.  In particular, the behavior in the presence of
NULLs is quite different.

            regards, tom lane

pgsql-performance by date:

Previous
From: Jean-Luc Lachance
Date:
Subject: Re: *very* inefficient choice made by the planner (regarding
Next
From: "Anjan Dave"
Date:
Subject: Re: Database Server Tuning