Order of Daily VACUUM, CLUSTER, REINDEX

Поиск
Список
Период
Сортировка
От APseudoUtopia
Тема Order of Daily VACUUM, CLUSTER, REINDEX
Дата
Msg-id 27ade5281003190800h1307d08es6c39f53864121c4e@mail.gmail.com
обсуждение исходный текст
Ответы Re: Order of Daily VACUUM, CLUSTER, REINDEX
Re: Order of Daily VACUUM, CLUSTER, REINDEX
Список pgsql-general
Hey list,

I have a cron script that runs a couple cleanup commands on my
database. It runs three commands:
VACUUM ANALYZE;
CLUSTER;
REINDEX DATABASE "database";

They are run in the above order. I was wondering if there's a better
order to do this in. For example, should the ANALYZE be run _after_
the CLUSTER? Does that affect the query planner? And the same goes for
REINDEX.

I could always split up the VACUUM and ANALYZE into separate commands
as well, if order would have any effect.

I _do_ have autovacuum running. However, I like to run these commands
during a low-traffic time just so autovacuum slows the site down as
least as possible during high-load times.

Thanks!

PostgreSQL 8.4.2 on i386-portbld-freebsd8.0, compiled by GCC cc (GCC)
4.2.1 20070719  [FreeBSD], 32-bit

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

Предыдущее
От: David Waddy
Дата:
Сообщение: Creating a view: ERROR: rules on SELECT must have action INSTEAD SELECT
Следующее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: Order of Daily VACUUM, CLUSTER, REINDEX