Re: Constraint exclusion won't exclude parent table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Constraint exclusion won't exclude parent table
Дата
Msg-id 27718.1400012679@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Constraint exclusion won't exclude parent table  (Tim Kane <tim.kane@gmail.com>)
Ответы Re: Constraint exclusion won't exclude parent table  (Tim Kane <tim.kane@gmail.com>)
Список pgsql-performance
Tim Kane <tim.kane@gmail.com> writes:
> So what is the append node actually doing, and why is it necessary?
> I expect that it simply does what it says, and appends the results of those
> two seq-scans.  But in reality, there isn’t a lot to do there. While I
> expect a little bit of overhead, surely it just passes the tuples straight
> through to the result node and that will be that.. No?

Yeah, it's not expected that that's going to cost much.  I am suspicious
that what you are looking at is mostly measurement overhead: during
EXPLAIN ANALYZE, each plan node has to do two gettimeofday() calls per
call, and there are lots of platforms where that is significant relative
to the actual work done per node.

You might try comparing the overall times for select count(*) from ...
rather than EXPLAIN ANALYZE for these two cases.  If those times are
much closer together than what you're getting from EXPLAIN ANALYZE,
then you've got a machine with expensive gettimeofday() and you have
to take your measurements with an appropriate quantum of salt.

            regards, tom lane


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

Предыдущее
От: Claudio Freire
Дата:
Сообщение: Re: Adaptive query execution
Следующее
От: Tim Kane
Дата:
Сообщение: Re: Adaptive query execution