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 D9AF98B9C8A for ; Sun, 6 Feb 2005 15:58:10 +0000 (GMT) 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 28887-05 for ; Sun, 6 Feb 2005 15:57:54 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id D416A8B9E5C for ; Sun, 6 Feb 2005 15:57:58 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1CxonE-0000oN-00; Sun, 06 Feb 2005 10:57:48 -0500 To: lutzeb@aeccom.com Cc: Greg Stark , pgsql-performance@postgresql.org, tgl@sss.pgh.pa.us, john@arbash-meinel.com Subject: Re: query produces 1 GB temp file References: <20050205182117.0125074@mail2.aeccom.com> <87y8e2kb8j.fsf@stark.xeocode.com> <42061B35.6000306@aeccom.com> In-Reply-To: <42061B35.6000306@aeccom.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 06 Feb 2005 10:57:48 -0500 Message-ID: <876515k7er.fsf@stark.xeocode.com> Lines: 9 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 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.056 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/89 X-Sequence-Number: 10418 I gave a bunch of "explain analyze select" commands to test estimates for individual columns. What results do they come up with? If those are inaccurate then raising the statistics target is a good route. If those are accurate individually but the combination is inaccurate then you have a more difficult problem. -- greg