Re: Finding orphan records

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Wes <wespvp(at)syntegra(dot)com>
Cc: Jonel Rienton <jonel(at)rientongroup(dot)com>, "'Postgresql-General'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Finding orphan records
Date: 2006-01-12 16:37:59
Message-ID: 8764opz9js.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Wes <wespvp(at)syntegra(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mikael Carneholm 2006-01-12 16:50:00 Re: Plans for 8.2?
Previous Message Joshua D. Drake 2006-01-12 16:23:27 Re: Plans for 8.2?