Re: Order of Daily VACUUM, CLUSTER, REINDEX

Поиск
Список
Период
Сортировка
От Leonardo F
Тема Re: Order of Daily VACUUM, CLUSTER, REINDEX
Дата
Msg-id 896754.76254.qm@web29018.mail.ird.yahoo.com
обсуждение исходный текст
Ответ на Order of Daily VACUUM, CLUSTER, REINDEX  (APseudoUtopia <apseudoutopia@gmail.com>)
Ответы Re: Order of Daily VACUUM, CLUSTER, REINDEX
Список pgsql-general
> 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").

Beware though that CLUSTER and REINDEX can be very long processes,
and that CLUSTER locks the whole table... they're not tools supposed to
be used that often (since there's usually no need to run them so often).

Why do you think you need to run those commands daily?




В списке pgsql-general по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Postgres officially accepted in to 2010 Google Summer of Code program
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Order of Daily VACUUM, CLUSTER, REINDEX