From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)atentus(dot)com> |
Cc: | Diogo Biazus <diogo(at)ikono(dot)com(dot)br>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problem with corrupt index |
Date: | 2002-09-30 18:40:49 |
Message-ID: | 23634.1033411249@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Alvaro Herrera <alvherre(at)atentus(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-09-30 18:44:39 | Re: Major Problem with locale |
Previous Message | Oleg Lebedev | 2002-09-30 18:39:19 | 7.2.1 to 7.3b1 |