Re: Problem with corrupt index

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Problem with corrupt index
Дата
Msg-id 20020930174932.GA26748@atentus.com
обсуждение исходный текст
Ответ на Problem with corrupt index  (Diogo Biazus <diogo@ikono.com.br>)
Ответы Re: Problem with corrupt index  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, Sep 30, 2002 at 02:41:16PM -0300, Diogo Biazus wrote:
> Hi everybody,
> I have a table that requires periodical updates (every 5 seconds) in
> more than one register.
> The table is very small (about 7 registers) and it wont grow.
> Sometimes the access to that table becomes very slow, and VACUUM dont
> fix it, I have to REINDEX the table.

Do you have an incrementing field in the table, and index it?  If so,
your problem is that the index doesn't drop empty pages or mark them as
free, and updating it will make the index bigger; the only way to
reclaim space is by means of recreating the index.

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.  If you have a primary key you can't do that, and you'll have
to continue doing REINDEX and VACUUM periodically.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"La virtud es el justo medio entre dos defectos" (Aristoteles)

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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: Problem with corrupt index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] CURRENT_TIMESTAMP