Re: Join method influences scan method? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Join method influences scan method?
Date
Msg-id 20910.1111041675@sss.pgh.pa.us
Whole thread Raw
In response to Join method influences scan method?  (mark.lubratt@indeq.com)
List pgsql-performance
mark.lubratt@indeq.com writes:
> So, it would seem like my optimal plan should have hash joins with index
> scans.

No.  The thing you are looking at here is a nestloop join with inner
index scan, which has to be understood as a unit even though EXPLAIN
doesn't describe it that way.  The inner indexscan is repeated once
for each outer row, using a join key from the outer row as part of the
index lookup.  That's simply not relevant to the other kinds of joins,
because they expect the inner and outer relations to be scanned
independently.

            regards, tom lane

pgsql-performance by date:

Previous
From: mark.lubratt@indeq.com
Date:
Subject: Join method influences scan method?
Next
From: Manfred Koizar
Date:
Subject: Re: index scan on =, but not < ?