X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DC1ACD77EF for ; Tue, 6 Sep 2005 00:53:48 -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 07380-04 for ; Tue, 6 Sep 2005 03:53:47 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1B402D70F4 for ; Tue, 6 Sep 2005 00:53:46 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j863rf0N014136; Mon, 5 Sep 2005 23:53:41 -0400 (EDT) To: gdh@eyjar.is Cc: pgsql-performance@postgresql.org Subject: Re: Query slow after VACUUM ANALYZE In-reply-to: <1913.213.220.100.208.1125483764.squirrel@www.eyjar.is> References: <1913.213.220.100.208.1125483764.squirrel@www.eyjar.is> Comments: In-reply-to gdh@eyjar.is message dated "Wed, 31 Aug 2005 10:22:44 -0000" Date: Mon, 05 Sep 2005 23:53:41 -0400 Message-ID: <14135.1125978821@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/77 X-Sequence-Number: 14385 gdh@eyjar.is writes: > Any ideas what I can do to make the query running in < 10 seconds? Increase work_mem (or sort_mem in older releases). PG is dropping back from the hash plan because it thinks the hashtable won't fit in work_mem. regards, tom lane