Re: Understanding EXPLAIN ANALYZE output

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Understanding EXPLAIN ANALYZE output
Дата
Msg-id 20558.1107985972@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Understanding EXPLAIN ANALYZE output  ("Ed L." <pgsql@bluepolka.net>)
Список pgsql-general
"Ed L." <pgsql@bluepolka.net> writes:
> If the second number of the "actual time" part means time
> elapsed in this node and its children until the last row was
> returned, why does it say "actual time=4.63..4.63" instead of
> "actual time=4.63..4767.62"?

The reason we do that is to make the "actual" numbers comparable to the
way that the estimated costs are presented.  The estimated costs are for
a single execution of the node, but the inner side of a nestloop join is
re-executed for each row coming from the outer side.  In this case, the
outer side produced 1014 rows so we ran 1014 separate executions of the
inner indexscan.  If we just reported 4767.62 as the total time, it
would look like the estimated indexscan cost of 10.28 was completely out
of whack, which it isn't.  So instead, we report a per-execution cost
and a "loops" number that you have to multiply by if you are thinking
about total time spent.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgresql and Macintosh
Следующее
От: "Van Ingen, Lane"
Дата:
Сообщение: FOR vs Cursors