Re: UNION ALL has higher cost than inheritance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UNION ALL has higher cost than inheritance
Дата
Msg-id 13453.1287638285@sss.pgh.pa.us
обсуждение исходный текст
Ответ на UNION ALL has higher cost than inheritance  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Ответы Re: UNION ALL has higher cost than inheritance  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Список pgsql-hackers
Itagaki Takahiro <itagaki.takahiro@gmail.com> writes:
> I found an explicit UNION ALL has higher cost than an automatic expansion
> by inheritance (49 vs. 83 in the example below). Where does the difference
> come from?

The plan for UNION initially involves a couple of SubqueryScan nodes,
which impose an extra cost of cpu_tuple_cost per tuple.  Those later
get optimized away, but we don't try to readjust the cost estimates
for that.
        regards, tom lane


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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Extensions, this time with a patch
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Serializable snapshot isolation patch