Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A68D19FBDAA for ; Tue, 8 May 2007 18:48:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 70408-09 for ; Tue, 8 May 2007 18:48:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from bifrost.lang.hm (dsl081-033-126.lax1.dsl.speakeasy.net [64.81.33.126]) by postgresql.org (Postfix) with ESMTP id 0D8DE9FBD85 for ; Tue, 8 May 2007 18:48:52 -0300 (ADT) Received: from asgard (asgard.lang.hm [10.0.0.100]) by bifrost.lang.hm (8.13.4/8.13.4/Debian-3) with ESMTP id l48LmnEk010736; Tue, 8 May 2007 14:48:49 -0700 Date: Tue, 8 May 2007 14:46:36 -0700 (PDT) From: david@lang.hm X-X-Sender: dlang@asgard.lang.hm To: Y Sidhu cc: pgsql-performance@postgresql.org Subject: Re: What's The Difference Between VACUUM and VACUUM ANALYZE? In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/145 X-Sequence-Number: 24535 On Tue, 8 May 2007, Y Sidhu 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. vaccum frees tuples that are no longer refrenced vaccum analyse does the same thing, but then does some additional information gathering about what data is in the tables Postgres uses this data to adjust it's estimates of how long various things will take (sequential scan, etc). if these estimates are off by a huge amount (especially if you have never done a vaccum analyse after loading your table) then it's very likely that postgres will be slow becouse it's doing expensive operations that it thinks are cheap. David Lang