Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 995E29FB5D8 for ; Wed, 9 May 2007 08:31:18 -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 74178-10 for ; Wed, 9 May 2007 08:31:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from oxford.xeocode.com (unknown [62.232.55.118]) by postgresql.org (Postfix) with ESMTP id 059519FB5C4 for ; Wed, 9 May 2007 08:31:13 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1HlkNz-0001J7-Mo; Wed, 09 May 2007 12:31:11 +0100 From: Gregory Stark To: "Alvaro Herrera" Cc: Subject: Re: What's The Difference Between VACUUM and VACUUM ANALYZE? In-Reply-To: <20070508222102.GD24167@alvh.no-ip.org> (Alvaro Herrera's message of "Tue, 8 May 2007 18:21:02 -0400") Organization: EnterpriseDB References: <20070508215213.GC24167@alvh.no-ip.org> <20070508220608.GA8457@uio.no> <20070508222102.GD24167@alvh.no-ip.org> X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.performance" 271) Date: Wed, 09 May 2007 12:31:11 +0100 Message-ID: <87hcqmi680.fsf@oxford.xeocode.com> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/179 X-Sequence-Number: 24569 "Alvaro Herrera" writes: > Steinar H. Gunderson wrote: > >> 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). I think it does for the count of total records in the table. But not for the rest of the stats. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com