mirror of
https://github.com/postgres/postgres.git
synced 2025-06-03 01:21:48 +03:00
Improve code coverage of select_parallel test.
Make sure that rescans of parallel indexscans are tested. Per code coverage report.
This commit is contained in:
parent
cb8e015b94
commit
4c7af96365
@ -179,6 +179,61 @@ select count(*) from tenk1 where thousand > 95;
|
|||||||
9040
|
9040
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
-- test rescan cases too
|
||||||
|
set enable_material = false;
|
||||||
|
explain (costs off)
|
||||||
|
select * from
|
||||||
|
(select count(unique1) from tenk1 where hundred > 10) ss
|
||||||
|
right join (values (1),(2),(3)) v(x) on true;
|
||||||
|
QUERY PLAN
|
||||||
|
--------------------------------------------------------------------------
|
||||||
|
Nested Loop Left Join
|
||||||
|
-> Values Scan on "*VALUES*"
|
||||||
|
-> Finalize Aggregate
|
||||||
|
-> Gather
|
||||||
|
Workers Planned: 4
|
||||||
|
-> Partial Aggregate
|
||||||
|
-> Parallel Index Scan using tenk1_hundred on tenk1
|
||||||
|
Index Cond: (hundred > 10)
|
||||||
|
(8 rows)
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(select count(unique1) from tenk1 where hundred > 10) ss
|
||||||
|
right join (values (1),(2),(3)) v(x) on true;
|
||||||
|
count | x
|
||||||
|
-------+---
|
||||||
|
8900 | 1
|
||||||
|
8900 | 2
|
||||||
|
8900 | 3
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
|
explain (costs off)
|
||||||
|
select * from
|
||||||
|
(select count(*) from tenk1 where thousand > 99) ss
|
||||||
|
right join (values (1),(2),(3)) v(x) on true;
|
||||||
|
QUERY PLAN
|
||||||
|
--------------------------------------------------------------------------------------
|
||||||
|
Nested Loop Left Join
|
||||||
|
-> Values Scan on "*VALUES*"
|
||||||
|
-> Finalize Aggregate
|
||||||
|
-> Gather
|
||||||
|
Workers Planned: 4
|
||||||
|
-> Partial Aggregate
|
||||||
|
-> Parallel Index Only Scan using tenk1_thous_tenthous on tenk1
|
||||||
|
Index Cond: (thousand > 99)
|
||||||
|
(8 rows)
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(select count(*) from tenk1 where thousand > 99) ss
|
||||||
|
right join (values (1),(2),(3)) v(x) on true;
|
||||||
|
count | x
|
||||||
|
-------+---
|
||||||
|
9000 | 1
|
||||||
|
9000 | 2
|
||||||
|
9000 | 3
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
|
reset enable_material;
|
||||||
reset enable_seqscan;
|
reset enable_seqscan;
|
||||||
reset enable_bitmapscan;
|
reset enable_bitmapscan;
|
||||||
-- test parallel bitmap heap scan.
|
-- test parallel bitmap heap scan.
|
||||||
|
@ -65,6 +65,26 @@ explain (costs off)
|
|||||||
select count(*) from tenk1 where thousand > 95;
|
select count(*) from tenk1 where thousand > 95;
|
||||||
select count(*) from tenk1 where thousand > 95;
|
select count(*) from tenk1 where thousand > 95;
|
||||||
|
|
||||||
|
-- test rescan cases too
|
||||||
|
set enable_material = false;
|
||||||
|
|
||||||
|
explain (costs off)
|
||||||
|
select * from
|
||||||
|
(select count(unique1) from tenk1 where hundred > 10) ss
|
||||||
|
right join (values (1),(2),(3)) v(x) on true;
|
||||||
|
select * from
|
||||||
|
(select count(unique1) from tenk1 where hundred > 10) ss
|
||||||
|
right join (values (1),(2),(3)) v(x) on true;
|
||||||
|
|
||||||
|
explain (costs off)
|
||||||
|
select * from
|
||||||
|
(select count(*) from tenk1 where thousand > 99) ss
|
||||||
|
right join (values (1),(2),(3)) v(x) on true;
|
||||||
|
select * from
|
||||||
|
(select count(*) from tenk1 where thousand > 99) ss
|
||||||
|
right join (values (1),(2),(3)) v(x) on true;
|
||||||
|
|
||||||
|
reset enable_material;
|
||||||
reset enable_seqscan;
|
reset enable_seqscan;
|
||||||
reset enable_bitmapscan;
|
reset enable_bitmapscan;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user