Re: Need to run CLUSTER to keep performance

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Need to run CLUSTER to keep performance
Дата
Msg-id 20071108145646.GI2938@alvh.no-ip.org
обсуждение исходный текст
Ответ на 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:
> Hello
>
> This is a question about something we have seen sometimes in the last
> months. It happens with tables with a large amount of updates/selects
> compared with the amount of inserts/deletes. The sizes of these tables
> are small and the amount of rows too.
>
> The 'problem' is that performance decrease during the day and the only
> thing that helps is to run CLUSTER on the table with problems. VACUUM
> ANALYZE does not help.

Probably because all the live tuples are clustered at the end of the
table, and the initial pages are polluted with dead tuples.  Try
vacuuming the table much more often, say every few minutes.

Your table is 2536 pages long, but it could probably be in the vicinity
of 700 ...

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

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

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