Re: VACUUM FULL ANALYSE hanging

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: VACUUM FULL ANALYSE hanging
Дата
Msg-id 20070502155020.GQ4585@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: VACUUM FULL ANALYSE hanging  (Peter Koczan <pjkoczan@gmail.com>)
Список pgsql-admin
Peter Koczan escribió:
> I've noticed in my own experiments and experiences with VACUUM FULL that
> it tries to reindex all the indexes to compress them. While a good idea,
> this unfortunately takes a *long* time.

Huh, this is not an accurate description of what happens.  VACUUM FULL
tries to keep indexes up to date, but it doesn't *reindex* them (like a
REINDEX command would do).

There was another thread about VACUUM FULL in which Tom Lane described
exactly what happened to indexes.

> In my experiences, doing a dump/restore was far faster, but this method
> creates downtime. (e.g. a 10 GB database took 2 hours to restore, while
> reindexing/vacuuming full was still on the same table after 4 hours).

It has been reported that CLUSTER is also faster than VACUUM FULL, and
it leaves the indexes more compact than VACUUM FULL to boot.  So it may
be the best option.  It is also easier to do than dump/restore.

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

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

Предыдущее
От: "dx k9"
Дата:
Сообщение: Re: reindexdb hangs
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: reindexdb hangs