I don't understand this explain output

Поиск
Список
Период
Сортировка
От Ron Arts
Тема I don't understand this explain output
Дата
Msg-id 4A1BA903.8020300@neonova.nl
обсуждение исходный текст
Ответы Re: I don't understand this explain output  (Luiz Eduardo Cantanhede Neri <lecneri@gmail.com>)
Re: I don't understand this explain output  (Frank Bax <fbax@sympatico.ca>)
Список pgsql-novice
Hi,

I am looking at a very simple query (select * from queue),
which takes forever to finish. I don't understand the output that
explain tells me:

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.


If I look at anopther table in the same database:

m=# explain select * from contact;
                          QUERY PLAN
-------------------------------------------------------------
  Seq Scan on contact  (cost=0.00..183.14 rows=614 width=411)
(1 row)

and this query finishes very quickly (614 rows).


Why would a simple query be so very costly?

Thanks,
Ron Arts

--
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 по дате отправления:

Предыдущее
От: "Just E. Mail"
Дата:
Сообщение: Read data from text file
Следующее
От: Frank Bax
Дата:
Сообщение: Re: Read data from text file