From: | Ron Arts <ron(dot)arts(at)neonova(dot)nl> |
---|---|
To: | PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: I don't understand this explain output |
Date: | 2009-05-26 13:12:24 |
Message-ID: | 4A1BEAB8.9090801@neonova.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
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.
I will run autovacuum full tonight. So the cost means
the total number of records to read including deleted ones?
Ron
Frank Bax schreef:
> Ron Arts wrote:
>> m=# explain select * from queue;
>> QUERY PLAN
>> ------------------------------------------------------------
>> Seq Scan on queue (cost=0.00..635477.00 rows=1 width=402)
>> (1 row)
>>
>> The cost seems to be very high. It's a small table (only 23 rows)
>> and has not seen many modifications since the table was initially
>> filled. OTOH many individual records are updated every minute.
>
>
>
> Then the inidividual records have been updated 635,477 times; because
> that's how many rows are really in the table. Each time a record is
> updated, the old one is still in database and a new one is added. Run
> "VACUUM FULL ANALYSE" on a regular basis to remove the obsolete records
> from table and recover disk space.
>
> Since 8.1, there is an optional feature called autovacuum.
>
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Just E. Mail | 2009-05-26 14:16:58 | Re: Read data from text file |
Previous Message | Frank Bax | 2009-05-26 12:59:49 | Re: I don't understand this explain output |