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 32E1AD1B17C for ; Thu, 10 Jun 2004 12:00:35 -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 72109-02 for ; Thu, 10 Jun 2004 15:00:30 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 6ECE4D1B1F8 for ; Thu, 10 Jun 2004 12:00:29 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 3865835810; Thu, 10 Jun 2004 08:00:28 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 36FC13580A; Thu, 10 Jun 2004 08:00:28 -0700 (PDT) Date: Thu, 10 Jun 2004 08:00:28 -0700 (PDT) From: Stephan Szabo To: Frank van Vugt Cc: pgsql-performance@postgresql.org Subject: Re: *very* inefficient choice made by the planner (regarding In-Reply-To: <200406101624.21739.ftm.van.vugt@foxi.nl> Message-ID: <20040610075749.G17875@megazone.bigpanda.com> References: <200406101624.21739.ftm.van.vugt@foxi.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 200406/113 X-Sequence-Number: 7171 On Thu, 10 Jun 2004, Frank van Vugt wrote: > Could anybody explain why the planner is doing what it is doing? > > What could I do to make it easier to choose a better plan? You might try raising sort_mem to see if it chooses a better plan. I think it may be guessing that the hash won't fit and falling back to the plan you were getting.