X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7FE84D1B174 for ; Thu, 29 Jul 2004 14:06:36 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62589-03 for ; Thu, 29 Jul 2004 17:06:28 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 730ACD1B462 for ; Thu, 29 Jul 2004 14:06:27 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i6TH6Qiu015404; Thu, 29 Jul 2004 13:06:27 -0400 (EDT) To: Stan Bielski Cc: pgsql-performance@postgresql.org Subject: Re: Optimizer refuses to hash join In-reply-to: References: Comments: In-reply-to Stan Bielski message dated "Tue, 27 Jul 2004 15:38:05 -0400" Date: Thu, 29 Jul 2004 13:06:26 -0400 Message-ID: <15403.1091120786@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/226 X-Sequence-Number: 7617 Stan Bielski writes: > I having a great deal of difficulty getting postgres to do a hash join. > Even if I disable nestloop and mergejoin in postgres.conf, the optimizer > still refuses to select hash join. Are you sure the join condition is hashjoinable? You didn't say anything about the datatypes involved ... If it is, the other possibility is that you need to increase sort_mem to accommodate the hash table. regards, tom lane