Re: Problem with corrupt index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with corrupt index
Дата
Msg-id 23634.1033411249@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem with corrupt index  (Alvaro Herrera <alvherre@atentus.com>)
Список pgsql-general
Alvaro Herrera <alvherre@atentus.com> writes:
> If you only have 7 registers in the table, you don't need the index
> anyway: a sequential scan is much faster.  My advice would be to drop
> the index.

Mine too.

> If you have a primary key you can't do that, and you'll have
> to continue doing REINDEX and VACUUM periodically.

In any case, the fact you are having this problem suggests that you
aren't doing VACUUMs often enough on this table.  If you've got seven
live rows and you update one of them every 5 seconds, then after an hour
you have seven live rows and 720 dead ones.  Things are going to be a
good bit slower than before.  If you wait days between vacuums then it
gets worse.

I'd recommend putting in a cron task to vacuum this particular table
hourly, or maybe even oftener.

            regards, tom lane

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

Предыдущее
От: "Oleg Lebedev"
Дата:
Сообщение: 7.2.1 to 7.3b1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Major Problem with locale