Re: Finding orphan records - Mailing list pgsql-general

From Greg Stark
Subject Re: Finding orphan records
Date
Msg-id 8764opz9js.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Finding orphan records  (Wes <wespvp@syntegra.com>)
Responses Re: Finding orphan records  (Wes <wespvp@syntegra.com>)
List pgsql-general
Wes <wespvp@syntegra.com> writes:

> This appears to be very inefficient.  B is almost two orders of magnitude
> larger than A.  C is about 3-4 times as big as B (record count).  My
> statement (with the same single 'B' table as above) produces:

If it's only a factor of 3-4 then the merge join should be faster. If it's
really two orders of magnitude (100x?) then the nested loop below would be
faster. I think in 8.1 (and I think in 8.0 too) the planner is capable of
coming up with both plans for the NOT IN query though.

--
greg

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Plans for 8.2?
Next
From: "Mikael Carneholm"
Date:
Subject: Re: Plans for 8.2?