Re: [PERFORM] plan variations: join vs. exists vs. row comparison

2011-03-07 Thread Kevin Grittner
Jon Nelson wrote: > What is the difference between a plain join and a semi join? As soon as a semi join finds a match it stops looking for more. -Kevin -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.

Re: [PERFORM] plan variations: join vs. exists vs. row comparison

2011-03-07 Thread Jon Nelson
On Mon, Mar 7, 2011 at 2:00 PM, Tom Lane wrote: > Jon Nelson writes: >> I was hoping that somebody could help me understand the differences >> between three plans. >> All of the plans are updating a table using a second table, and should >> be logically equivalent. >> Two of the plans use joins,

Re: [PERFORM] plan variations: join vs. exists vs. row comparison

2011-03-07 Thread Merlin Moncure
On Mon, Mar 7, 2011 at 1:07 PM, Jon Nelson wrote: > Originally, I posted to -general but I found some time to write some > samples, and realized it's probably more of a performance question. > > The original post is here: > http://archives.postgresql.org/pgsql-general/2011-03/msg00198.php > > I wa

Re: [PERFORM] plan variations: join vs. exists vs. row comparison

2011-03-07 Thread Tom Lane
Jon Nelson writes: > I was hoping that somebody could help me understand the differences > between three plans. > All of the plans are updating a table using a second table, and should > be logically equivalent. > Two of the plans use joins, and one uses an exists subquery. > One of the plans uses