Re: about explain analyze

Поиск
Список
Период
Сортировка
От Marc G. Fournier
Тема Re: about explain analyze
Дата
Msg-id 20031128135850.O41642@ganymede.hub.org
обсуждение исходный текст
Ответ на Re: about explain analyze  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 28 Nov 2003, Tom Lane wrote:

> "Marc G. Fournier" <scrappy@postgresql.org> writes:
> > Actually, I'm noticing similar "problems" with v7.4 ... "EXPLAIN ANALYZE"
> > seems to be showing some *very* high ms for execution time, but if you run
> > the actual query, it doesn't seem to take even 1/10th the time reported
> > ...
>
> Example?  I don't see anything out of line here.

pgsql74# /usr/local/pgsql/bin/psql -U pgsql -c "SELECT count(rec_id) FROM url" 186_archivescount
--------209872
(1 row)

pgsql74# /usr/local/pgsql/bin/psql -U pgsql -c "EXPLAIN ANALYZE SELECT max(rec_id) FROM url" 186_archives
                                    QUERY PLAN
 

--------------------------------------------------------------------------------------------------------------------Aggregate
(cost=11177.19..11177.19 rows=1 width=4) (actual time=2400.579..2400.585 rows=1 loops=1)  ->  Seq Scan on url
(cost=0.00..10741.55rows=174255 width=4) (actual time=0.056..1387.803 rows=209872 loops=1)Total runtime: 2407.095 ms
 
(3 rows)

pgsql74# time /usr/local/pgsql/bin/psql -U pgsql -c "SELECT max(rec_id) FROM url" 186_archives max
--------690582
(1 row)

0.000u 0.004s 0:00.32 0.0%      0+0k 0+0io 0pf+0w

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Functions with COPY
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Functions with COPY