Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id EEF889F96D1 for ; Thu, 1 Nov 2007 19:00:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 56079-02-6 for ; Thu, 1 Nov 2007 18:59:41 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id BF3469F9977 for ; Thu, 1 Nov 2007 18:42:00 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lA1LfwOn015854; Thu, 1 Nov 2007 17:41:58 -0400 (EDT) To: "Carlo Stonebanks" cc: pgsql-performance@postgresql.org Subject: Re: How to avoid hashjoin and mergejoin In-reply-to: References: Comments: In-reply-to "Carlo Stonebanks" message dated "Thu, 01 Nov 2007 16:57:34 -0400" Date: Thu, 01 Nov 2007 17:41:58 -0400 Message-ID: <15853.1193953318@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/25 X-Sequence-Number: 27440 "Carlo Stonebanks" writes: > Still, the Linux server did not create the same, fast plan as the Windows > server. In order to get the same plan we had to: > set enable_hashjoin to 'off'; > set enable_mergejoin to 'off'; This is just about never the appropriate way to solve a performance problem, as it will inevitably create performance problems in other queries. What I'm wondering is whether the tables have been ANALYZEd recently, and also whether there are any nondefault postgresql.conf settings in use on the other server. regards, tom lane