From: Tom Lane <tgl@sss.pgh.pa.us>
To: mark.lubratt@indeq.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Join method influences scan method?
Date: Thu, 17 Mar 2005 01:41:15 -0500
Message-ID: <20910.1111041675@sss.pgh.pa.us> (raw)
In-Reply-To: <20050317061624.12920.qmail@gem-wbe01.mesa1.secureserver.net>
References: <20050317061624.12920.qmail@gem-wbe01.mesa1.secureserver.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, mark.lubratt@indeq.com
Subject: Re: Join method influences scan method?
In-Reply-To: <20910.1111041675@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox