Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 4BB629FBE28 for ; Tue, 8 May 2007 19:21:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 00427-07 for ; Tue, 8 May 2007 19:21:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id BC3549FBE21 for ; Tue, 8 May 2007 19:21:06 -0300 (ADT) Received: from perhan.alvh.no-ip.org (201-221-217-243.bk12-dsl.surnet.cl [201.221.217.243]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l48ML60r011349 for ; Tue, 8 May 2007 15:21:08 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 1BFE332A0F; Tue, 8 May 2007 18:21:02 -0400 (CLT) Date: Tue, 8 May 2007 18:21:02 -0400 From: Alvaro Herrera To: pgsql-performance@postgresql.org Subject: Re: What's The Difference Between VACUUM and VACUUM ANALYZE? Message-ID: <20070508222102.GD24167@alvh.no-ip.org> References: <20070508215213.GC24167@alvh.no-ip.org> <20070508220608.GA8457@uio.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070508220608.GA8457@uio.no> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 08 May 2007 15:21:08 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/148 X-Sequence-Number: 24538 Steinar H. Gunderson wrote: > On Tue, May 08, 2007 at 05:52:13PM -0400, Alvaro Herrera wrote: > >> I am trying to follow a message thread. One guy says we should be running > >> vacuum analyze daily and the other says we should be running vacuum multiple > >> times a day. I have tried looking for what a vacuum analyze is to help me > >> understand but no luck. > > VACUUM ANALYZE is like VACUUM, except that it also runs an ANALYZE > > afterwards. > > Shoot me if I'm wrong here, but doesn't VACUUM ANALYZE check _all_ tuples, > as compared to the random selection employed by ANALYZE? You are wrong, but it won't be me the one to shoot you. There have been noises towards making the ANALYZE portion use the same scan that VACUUM already does, but nobody has written the code (it would be useful for some kinds of stats). -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support