Re: I don't understand this explain output
От | Ron Arts |
---|---|
Тема | Re: I don't understand this explain output |
Дата | |
Msg-id | 4A1BEAB8.9090801@neonova.nl обсуждение исходный текст |
Ответ на | Re: I don't understand this explain output (Frank Bax <fbax@sympatico.ca>) |
Ответы |
Re: I don't understand this explain output
|
Список | 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
В списке pgsql-novice по дате отправления: