Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 93A9A9FB3F0 for ; Mon, 26 Feb 2007 07:52:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 04358-05 for ; Mon, 26 Feb 2007 07:52:51 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id CA1DB9FB360 for ; Mon, 26 Feb 2007 07:52:50 -0400 (AST) Received: from trofast.ipv6.sesse.net ([2001:700:300:1803:20e:cff:fe36:a766] helo=trofast.sesse.net) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1HLePO-0005Pp-17; Mon, 26 Feb 2007 12:52:48 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1HLeP6-00018b-00; Mon, 26 Feb 2007 12:52:28 +0100 Date: Mon, 26 Feb 2007 12:52:27 +0100 From: "Steinar H. Gunderson" To: Gauri Kanekar Cc: pgsql-performance@postgresql.org Subject: Re: Query Planner Message-ID: <20070226115227.GA4338@uio.no> Mail-Followup-To: Gauri Kanekar , pgsql-performance@postgresql.org References: <7e4ba9550702260349r7c550aa2mb0b610874645b3c3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7e4ba9550702260349r7c550aa2mb0b610874645b3c3@mail.gmail.com> X-Operating-System: Linux 2.6.19 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/281 X-Sequence-Number: 23335 On Mon, Feb 26, 2007 at 05:19:05PM +0530, Gauri Kanekar wrote: > I have a Query. So when i do explain analyse on it , it shows me many Hash > Joins. > So is it possible to indicate the Query Planner not to consider Hash Join. set enable_hashjoin = false; This is very often the wrong solution, though. If hash join is indeed slower than merge join, the planner should have guessed so, and it would be better to find out why the planner guessed wrong, and correct it somehow. /* Steinar */ -- Homepage: http://www.sesse.net/