Re: I don't understand this explain output - Mailing list pgsql-novice

From Tom Lane
Subject Re: I don't understand this explain output
Date
Msg-id 11824.1243348445@sss.pgh.pa.us
Whole thread Raw
In response to Re: I don't understand this explain output  (Ron Arts <ron.arts@neonova.nl>)
Responses Re: I don't understand this explain output
List pgsql-novice
Ron Arts <ron.arts@neonova.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

pgsql-novice by date:

Previous
From: Luiz Eduardo Cantanhede Neri
Date:
Subject: Re: Tool for modeling
Next
From: Ibrahim Shaame
Date:
Subject: Re: cannot install postgres