Re: Need to run CLUSTER to keep performance

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Need to run CLUSTER to keep performance
Дата
Msg-id 473326C3.3070206@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Need to run CLUSTER to keep performance  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
Ответы Re: Need to run CLUSTER to keep performance  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
Список pgsql-performance
Rafael Martinez wrote:
> Heikki Linnakangas wrote:
>> On a small table like that you could run VACUUM every few minutes
>> without much impact on performance. That should keep the table size in
>> check.
>
> Ok, we run VACUUM ANALYZE only one time a day, every night. But we would
> espect the performance to get ok again after running vacuum, and it
> doesn't. Only CLUSTER helps.

If the table is already bloated, a VACUUM won't usually shrink it. It
only makes the space available for reuse, but a sequential scan still
needs to go through a lot of pages.

CLUSTER on the other hand repacks the tuples and gets rid of all the
unused space on pages. You need to run CLUSTER or VACUUM FULL once to
shrink the relation, but after that frequent-enough VACUUMs should keep
the table size down.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Estimation problem with a LIKE clause containing a /
Следующее
От: Rafael Martinez
Дата:
Сообщение: Re: Need to run CLUSTER to keep performance