Re: I don't understand this explain output

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

Tom Lane schreef:
> 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

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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Dale Seaburg 2009-05-26 22:59:06 Conditional ALTER TABLE
Previous Message Alan McKay 2009-05-26 19:37:45 Re: PG commands not working?