Re: I don't understand this explain output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Arts <ron(dot)arts(at)neonova(dot)nl>
Cc: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: I don't understand this explain output
Date: 2009-05-26 14:34:05
Message-ID: 11824.1243348445@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Ron Arts <ron(dot)arts(at)neonova(dot)nl> writes:
> thanks for the answer, I forgot to mention that I did
> enable autovacuum in postgresql.conf a while ago.
> (autovacuum = on). But that did not seem to help.

Once the table is bloated, autovacuum won't do much to de-bloat it.
You need a one-time cleanup to get rid of the bloat, and then
hopefully autovac will keep things under control after that.

VACUUM FULL and then REINDEX would do for cleanup. On large
tables it would be better to use CLUSTER, but with only 23 live
rows, VACUUM FULL will be fast enough.

> I will run autovacuum full tonight. So the cost means
> the total number of records to read including deleted ones?

No, it's more like the total number of disk pages to read. The
previous claim that it was equal to the number of dead rows is
erroneous.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ibrahim Shaame 2009-05-26 14:46:42 Re: cannot install postgres
Previous Message Luiz Eduardo Cantanhede Neri 2009-05-26 14:26:59 Re: Tool for modeling