From: Tom Lane <tgl@sss.pgh.pa.us>
To: Craig Ringer <ringerc@ringerc.id.au>
Cc: Melaka Gunasekara <donmelaka@gmail.com>
Cc: Raghavendra <raghavendra.rao@enterprisedb.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: How to change query planner configuration paramerters
Date: Sun, 18 Sep 2011 12:33:40 -0400
Message-ID: <16153.1316363620@sss.pgh.pa.us> (raw)
In-Reply-To: <4E75CB6D.9000302@ringerc.id.au>
References: <CAM4Dy=120OKxqjsXV1rRK1eXH=uoDes_k5SvrUdR6xESUXWAww@mail.gmail.com>
<CA+h6Ahhb6SyXt55YgsWmKOJkQ-opKpDHJv_rWJ_WejF=F+0GTw@mail.gmail.com>
<CAM4Dy=27O0n9bvuETRdhCx3cR-24+ifmfNxm3CFNbA8_CKZsZA@mail.gmail.com>
<4E75CB6D.9000302@ringerc.id.au>
Craig Ringer <ringerc@ringerc.id.au> writes:
> On 18/09/2011 5:51 PM, Melaka Gunasekara wrote:
>> Merge Full Join (cost=10000000074.40..10000000093.69 rows=1159 width=286)
>> Can you suggest why the merge join is being suggested when I have
>> turned it off ?
> AFAIK SETting a join type to "off" really just increases the cost
> estimate so high that the planner will avoid using it where it has any
> alternative. In this case, it doesn't seem to think it has any other way
> to execute the query, or it thinks that any other way will be so
> incredibly, insanely slow that the merge join is still better.
It's the first of those --- FULL joins are only implemented in the
mergejoin logic, not in hash or nestloop joins, so there is no other way
to do this query. (But as of 9.1, hash joins can do them too.)
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, ringerc@ringerc.id.au, donmelaka@gmail.com, raghavendra.rao@enterprisedb.com
Subject: Re: How to change query planner configuration paramerters
In-Reply-To: <16153.1316363620@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