index 80e71b8e2b9ccffa24c39cc83fcc8f3c93298783..c72a6d051f1dd02a69335b65b8bd9dd8a140ba12 100644 (file)
@@ -3684,18 +3684,17 @@ create table listp_12_2 partition of listp_12 for values in(2);
alter table listp_12_1 set (parallel_workers = 0);
-- Ensure that listp_12_2 is not scanned. (The nested Append is not seen in
-- the plan as it's pulled in setref.c due to having just a single subnode).
-explain (analyze on, costs off, timing off, summary off)
-select * from listp where a = (select 1);
- QUERY PLAN
+select explain_parallel_append('select * from listp where a = (select 1);');
+ explain_parallel_append
----------------------------------------------------------------------
- Gather (actual rows=0 loops=1)
+ Gather (actual rows=N loops=N)
Workers Planned: 2
Params Evaluated: 0ドル
- Workers Launched: 2
+ Workers Launched: N
InitPlan 1 (returns 0ドル)
- -> Result (actual rows=1 loops=1)
- -> Parallel Append (actual rows=0 loops=3)
- -> Seq Scan on listp_12_1 listp_1 (actual rows=0 loops=1)
+ -> Result (actual rows=N loops=N)
+ -> Parallel Append (actual rows=N loops=N)
+ -> Seq Scan on listp_12_1 listp_1 (actual rows=N loops=N)
Filter: (a = 0ドル)
-> Parallel Seq Scan on listp_12_2 listp_2 (never executed)
Filter: (a = 0ドル)
-- Like the above but throw some more complexity at the planner by adding
-- a UNION ALL. We expect both sides of the union not to scan the
-- non-required partitions.
-explain (analyze on, costs off, timing off, summary off)
-select * from listp where a = (select 1)
+select explain_parallel_append(
+'select * from listp where a = (select 1)
union all
-select * from listp where a = (select 2);
- QUERY PLAN
+select * from listp where a = (select 2);');
+ explain_parallel_append
-----------------------------------------------------------------------------------
- Append (actual rows=0 loops=1)
- -> Gather (actual rows=0 loops=1)
+ Append (actual rows=N loops=N)
+ -> Gather (actual rows=N loops=N)
Workers Planned: 2
Params Evaluated: 0ドル
- Workers Launched: 2
+ Workers Launched: N
InitPlan 1 (returns 0ドル)
- -> Result (actual rows=1 loops=1)
- -> Parallel Append (actual rows=0 loops=3)
- -> Seq Scan on listp_12_1 listp_1 (actual rows=0 loops=1)
+ -> Result (actual rows=N loops=N)
+ -> Parallel Append (actual rows=N loops=N)
+ -> Seq Scan on listp_12_1 listp_1 (actual rows=N loops=N)
Filter: (a = 0ドル)
-> Parallel Seq Scan on listp_12_2 listp_2 (never executed)
Filter: (a = 0ドル)
- -> Gather (actual rows=0 loops=1)
+ -> Gather (actual rows=N loops=N)
Workers Planned: 2
Params Evaluated: 1ドル
- Workers Launched: 2
+ Workers Launched: N
InitPlan 2 (returns 1ドル)
- -> Result (actual rows=1 loops=1)
- -> Parallel Append (actual rows=0 loops=3)
+ -> Result (actual rows=N loops=N)
+ -> Parallel Append (actual rows=N loops=N)
-> Seq Scan on listp_12_1 listp_4 (never executed)
Filter: (a = 1ドル)
- -> Parallel Seq Scan on listp_12_2 listp_5 (actual rows=0 loops=1)
+ -> Parallel Seq Scan on listp_12_2 listp_5 (actual rows=N loops=N)
Filter: (a = 1ドル)
(23 rows)
index 939a9b1193ed57d19ad90bb4299afacfb2416ac1..ffd5fe8b0dc501f09de9ce3e53172802fa71105f 100644 (file)
-- Ensure that listp_12_2 is not scanned. (The nested Append is not seen in
-- the plan as it's pulled in setref.c due to having just a single subnode).
-explain (analyze on, costs off, timing off, summary off)
-select * from listp where a = (select 1);
+select explain_parallel_append('select * from listp where a = (select 1);');
-- Like the above but throw some more complexity at the planner by adding
-- a UNION ALL. We expect both sides of the union not to scan the
-- non-required partitions.
-explain (analyze on, costs off, timing off, summary off)
-select * from listp where a = (select 1)
+select explain_parallel_append(
+'select * from listp where a = (select 1)
union all
-select * from listp where a = (select 2);
+select * from listp where a = (select 2);');
drop table listp;
reset parallel_tuple_cost;