Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 4247D9FBCD3 for ; Thu, 5 Apr 2007 10:33:35 -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 51946-08 for ; Thu, 5 Apr 2007 10:33:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 506C79FB72A for ; Thu, 5 Apr 2007 10:33:28 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1HZS5a-0000dl-9t for pgsql-sql@postgresql.org; Thu, 05 Apr 2007 09:33:22 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id CCB9D3F9E; Thu, 5 Apr 2007 09:33:16 -0400 (EDT) Date: Thu, 5 Apr 2007 09:33:16 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: slow query Message-ID: <20070405133316.GC6464@phlogiston.dyndns.org> References: <7539aebb0704042017l70d83d53u9c2e5105620a3fa7@mail.gmail.com> <20070405051127.GA24814@a-kretschmer.de> <19157.1175750845@sss.pgh.pa.us> <20070405053637.GC24814@a-kretschmer.de> <19565.1175752023@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19565.1175752023@sss.pgh.pa.us> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/73 X-Sequence-Number: 28073 On Thu, Apr 05, 2007 at 01:47:03AM -0400, Tom Lane wrote: > [ shrug... ] If the damage is already done, lazy VACUUM won't fix it. > Also, if there are enough open transactions at any one time and sufficient churn in the table, lazy VACUUM may not be able to keep up. (We had that experience with a table that was updated _very very_ often. The answer turned out to be to update less often. Aggregating queries that could use an index over a large number of "expired" rows worked better than seqscans over large numbers of dead tuples.) A -- Andrew Sullivan | ajs@crankycanuck.ca Information security isn't a technological problem. It's an economics problem. --Bruce Schneier