9.6beta, parallel execution and cpu_tuple_cost
| От | Thomas Kellerer |
|---|---|
| Тема | 9.6beta, parallel execution and cpu_tuple_cost |
| Дата | |
| Msg-id | ni9hsa$tko$1@ger.gmane.org обсуждение исходный текст |
| Ответы |
Re: 9.6beta, parallel execution and cpu_tuple_cost
Re: 9.6beta, parallel execution and cpu_tuple_cost |
| Список | pgsql-general |
Hello,
while playing around with the parallel aggregates and seq scan in 9.6beta I noticed that Postgres will stop using
parallelplans when cpu_tuple_cost is set to a very small number.
When using the defaults and max_parallel_degree = 4, the following (test) query will be executed with 4 workers
explain (analyze, verbose)
select o.customer_id,
count(*) num_orders,
sum(ol.price) as total_price,
sum(p.purchase_price) as total_purchase_price
from orders o
join order_line ol on o.id = ol.order_id
join product p ON ol.product_id = p.id
group by o.customer_id;
The execution plan is: https://explain.depesz.com/s/C7g
After setting cpu_tuple_cost to something small:
set cpu_tuple_cost = 0.0001;
No parallel wokers are used: https://explain.depesz.com/s/q1zb
I am not sure I understand why this is happening. Why would lowering the CPU cost for a tuple result in not using a
parallelplan?
Is this an oversight, a bug or intended?
Regards
Thomas
В списке pgsql-general по дате отправления: