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

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

Tom and others. Yes, vacuum full did the trick:

INFO:  "queue": moved 17 row versions, truncated 635478 to 2 pages

m=# explain select * from queue;
                       QUERY PLAN
--------------------------------------------------------
Seq Scan on queue  (cost=0.00..2.21 rows=21 width=403)
(1 row)


BIG difference.

Thanks a lot everyone. Especially you Tom, I have great respect
for the amount of work you put in answering all these questions.

Ron

--
NeoNova BV
innovatieve internetoplossingen

http://www.neonova.nl  Science Park 140           1098 XG Amsterdam
info: 020-5611300      servicedesk: 020-5611302   fax: 020-5611301
KvK Amsterdam 34151241

Op dit bericht is de volgende disclaimer van toepassing:
http://www.neonova.nl/maildisclaimer

pgsql-novice by date:

Previous
From: Alan McKay
Date:
Subject: Re: PG commands not working?
Next
From: Dale Seaburg
Date:
Subject: Conditional ALTER TABLE