Re: Poor Performance on a table

От: Tom Lane
Тема: Re: Poor Performance on a table
Дата: ,
Msg-id: 29227.1102016219@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Poor Performance on a table  (Pallav Kalva)
Ответы: Re: Poor Performance on a table  (Pallav Kalva)
Список: pgsql-performance

Скрыть дерево обсуждения

Poor Performance on a table  (Pallav Kalva, )
 Re: Poor Performance on a table  (Frank Wiles, )
  Re: Poor Performance on a table  (Pallav Kalva, )
   Re: Poor Performance on a table  (Frank Wiles, )
 Re: Poor Performance on a table  (Tom Lane, )
  Re: Poor Performance on a table  (Pallav Kalva, )
   Re: Poor Performance on a table  (Tom Lane, )
   Re: Poor Performance on a table  (Josh Berkus, )

Pallav Kalva <> writes:
>     I have a table in my production database which has 500k rows and
> from the pg_class it shows the number of "relpages" of
> around 750K for this table, the same table copied to a test database
> shows "relpages" as 35k. I run vacuumdb on the whole
> database (not on the table individually but the whole database) daily.

You're obviously suffering serious table bloat :-(.  Depending on how
heavy the update traffic on that table is, it might be that once-a-day
vacuum is simply not often enough.  Another likely problem is that you
need to increase the FSM settings (how big is your whole database?)

>   Is there any way to fix this problem ?

VACUUM FULL will fix the immediate problem.  You might well find CLUSTER
to be a faster alternative, though.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: "Jim C. Nasby"
Дата:
Сообщение: Re: Normalization or Performance
От: "Iain"
Дата:
Сообщение: Re: Normalization or Performance