Re: Explain output: wrong row count?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Explain output: wrong row count?
Дата
Msg-id 675.1101404818@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Explain output: wrong row count?  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> I have this EXPLAIN ANALYZE output:
> ...
>    ->  Hash  (cost=13.99..13.99 rows=499 width=89) (actual time=5.947..5.947 rows=0 loops=1)
>          ->  Seq Scan on ciudad  (cost=0.00..13.99 rows=499 width=89) (actual time=0.018..3.909 rows=499 loops=1)

> Note that the Hash step has an estimated row count of 499 (which is a
> good estimate), but the actual row count is 0, which is way off.

The "actual rows" count on a Hash node is always 0, because we don't
retrieve rows from it in the normal way (ie via ExecProcNode).  The
actual row count from the child plan node (here, the 499 for the
seqscan) tells you how many rows got loaded into the hashtable.

I've occasionally thought about putting in some kind of kluge to set the
"actual rows" count to the hash table size, just because it looks funny
to have zero there.  But it hasn't got to the top of the to-do list ...
        regards, tom lane


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Solaris 8 regression test failure with 8.0.0beta5
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Solaris 8 regression test failure with 8.0.0beta5