Skip site navigation (1) Skip section navigation (2)

Re: [doc patch] a slight VACUUM / VACUUM FULL doc improvement proposal

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: [doc patch] a slight VACUUM / VACUUM FULL doc improvement proposal
Date: 2007-05-16 21:25:50
Message-ID: 20070516212550.GM4582@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-docspgsql-performance
Michael Stone wrote:
> On Wed, May 16, 2007 at 03:34:42PM -0400, Chris Browne wrote:
> >mstone+postgres(at)mathom(dot)us (Michael Stone) writes:
> >>Unless, of course, you don't particularly care about the order of
> >>the items in your table; you might end up wasting vastly more time
> >>rewriting tables due to unnecessary clustering than for full vacuums
> >>on a table that doesn't need it.
> >
> >Actually, this is irrelevant.
> 
> I think it's perfectly relevant.
> 
> >If CLUSTER is faster than VACUUM FULL (and if it isn't, in all cases,
> >it *frequently* is, and probably will be, nearly always, soon), then
> >it's a faster workaround.
> 
> Cluster reorders the table. If a table doesn't have any dead rows and 
> you tell someone to run cluster or vacuum full, the vaccuum basically 
> won't do anything and the cluster will reorder the whole table. Cluster 
> is great for certain access patterns, but I've been noticing this odd 
> tendency lately to treat it like a silver bullet.

Well, it's certainly not a silver bullet; you would use VACUUM (not
full) for most of your needs, and CLUSTER for the rare other cases.  Of
course you would not pick an index at random each time, but rather keep
using the same one, which would supposedly be faster.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

pgsql-docs by date

Next:From: Tom LaneDate: 2007-05-16 21:30:51
Subject: Re: [doc patch] a slight VACUUM / VACUUM FULL doc improvement proposal
Previous:From: Tom LaneDate: 2007-05-16 21:20:56
Subject: Re: [DOCS] Autovacuum and XID wraparound

pgsql-performance by date

Next:From: Tom LaneDate: 2007-05-16 21:30:51
Subject: Re: [doc patch] a slight VACUUM / VACUUM FULL doc improvement proposal
Previous:From: Michael StoneDate: 2007-05-16 21:17:16
Subject: Re: [doc patch] a slight VACUUM / VACUUM FULL doc improvement proposal

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group