Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 46F3FB5DBF2 for ; Sun, 18 Sep 2011 07:44:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 28993-02 for ; Sun, 18 Sep 2011 10:44:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-iy0-f174.google.com (mail-iy0-f174.google.com [209.85.210.174]) by mail.postgresql.org (Postfix) with ESMTP id CB7B8B5DBC5 for ; Sun, 18 Sep 2011 07:44:03 -0300 (ADT) Received: by iaqq3 with SMTP id q3so4120248iaq.19 for ; Sun, 18 Sep 2011 03:44:03 -0700 (PDT) Received: by 10.68.22.7 with SMTP id z7mr2437527pbe.492.1316342643287; Sun, 18 Sep 2011 03:44:03 -0700 (PDT) Received: from [10.1.1.6] (124-148-242-247.dyn.iinet.net.au. [124.148.242.247]) by mx.google.com with ESMTPS id e8sm54686182pbc.8.2011.09.18.03.44.00 (version=SSLv3 cipher=OTHER); Sun, 18 Sep 2011 03:44:02 -0700 (PDT) Message-ID: <4E75CB6D.9000302@ringerc.id.au> Date: Sun, 18 Sep 2011 18:43:57 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Melaka Gunasekara CC: Raghavendra , pgsql-admin@postgresql.org Subject: Re: How to change query planner configuration paramerters References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201109/124 X-Sequence-Number: 38361 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. -- Craig Ringer