From: | Alvaro Herrera <alvherre(at)atentus(dot)com> |
---|---|
To: | Diogo Biazus <diogo(at)ikono(dot)com(dot)br> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problem with corrupt index |
Date: | 2002-09-30 17:49:32 |
Message-ID: | 20020930174932.GA26748@atentus.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-09-30 17:59:00 | Re: [SQL] CURRENT_TIMESTAMP |
Previous Message | Doug McNaught | 2002-09-30 17:49:10 | Re: Problem with corrupt index |