Re: Order of Daily VACUUM, CLUSTER, REINDEX - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Order of Daily VACUUM, CLUSTER, REINDEX
Date
Msg-id 20100319170517.GB3301@alvh.no-ip.org
Whole thread Raw
In response to Re: Order of Daily VACUUM, CLUSTER, REINDEX  (Leonardo F <m_lists@yahoo.it>)
List pgsql-general
Leonardo F escribió:
> > VACUUM ANALYZE;
> > CLUSTER;
> > REINDEX DATABASE "database";
>
> ANALYZE has to go after CLUSTER; and CLUSTER already
> vacuums the tables (I'm not 100% sure though). CLUSTER also
> reindexes the whole table, so there's no need for another REINDEX.
>
> I think the right way of doing it would be:
>
> CLUSTER;
> ANALYZE; (no "vacuum analyze", just "analyze").

Note that cluster only clusters tables that have been previously
clustered.  So you still need to vacuum tables that are not clustered.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-general by date:

Previous
From: Leonardo F
Date:
Subject: Re: Order of Daily VACUUM, CLUSTER, REINDEX
Next
From: Jay
Date:
Subject: Help me with this tricky join