Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4b1dd62

Browse files
committed
Improve code coverage of select_parallel test.
Make sure that rescans of parallel indexscans are tested.Per code coverage report.
1 parentb5c75fe commit4b1dd62

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

‎src/test/regress/expected/select_parallel.out

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,61 @@ select count(*) from tenk1 where thousand > 95;
179179
9040
180180
(1 row)
181181

182+
-- test rescan cases too
183+
set enable_material = false;
184+
explain (costs off)
185+
select * from
186+
(select count(unique1) from tenk1 where hundred > 10) ss
187+
right join (values (1),(2),(3)) v(x) on true;
188+
QUERY PLAN
189+
--------------------------------------------------------------------------
190+
Nested Loop Left Join
191+
-> Values Scan on "*VALUES*"
192+
-> Finalize Aggregate
193+
-> Gather
194+
Workers Planned: 4
195+
-> Partial Aggregate
196+
-> Parallel Index Scan using tenk1_hundred on tenk1
197+
Index Cond: (hundred > 10)
198+
(8 rows)
199+
200+
select * from
201+
(select count(unique1) from tenk1 where hundred > 10) ss
202+
right join (values (1),(2),(3)) v(x) on true;
203+
count | x
204+
-------+---
205+
8900 | 1
206+
8900 | 2
207+
8900 | 3
208+
(3 rows)
209+
210+
explain (costs off)
211+
select * from
212+
(select count(*) from tenk1 where thousand > 99) ss
213+
right join (values (1),(2),(3)) v(x) on true;
214+
QUERY PLAN
215+
--------------------------------------------------------------------------------------
216+
Nested Loop Left Join
217+
-> Values Scan on "*VALUES*"
218+
-> Finalize Aggregate
219+
-> Gather
220+
Workers Planned: 4
221+
-> Partial Aggregate
222+
-> Parallel Index Only Scan using tenk1_thous_tenthous on tenk1
223+
Index Cond: (thousand > 99)
224+
(8 rows)
225+
226+
select * from
227+
(select count(*) from tenk1 where thousand > 99) ss
228+
right join (values (1),(2),(3)) v(x) on true;
229+
count | x
230+
-------+---
231+
9000 | 1
232+
9000 | 2
233+
9000 | 3
234+
(3 rows)
235+
236+
reset enable_material;
182237
reset enable_seqscan;
183238
reset enable_bitmapscan;
184239
-- test parallel bitmap heap scan.

‎src/test/regress/sql/select_parallel.sql

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,26 @@ explain (costs off)
6565
selectcount(*)from tenk1where thousand>95;
6666
selectcount(*)from tenk1where thousand>95;
6767

68+
-- test rescan cases too
69+
set enable_material= false;
70+
71+
explain (costs off)
72+
select*from
73+
(selectcount(unique1)from tenk1where hundred>10) ss
74+
right join (values (1),(2),(3)) v(x)on true;
75+
select*from
76+
(selectcount(unique1)from tenk1where hundred>10) ss
77+
right join (values (1),(2),(3)) v(x)on true;
78+
79+
explain (costs off)
80+
select*from
81+
(selectcount(*)from tenk1where thousand>99) ss
82+
right join (values (1),(2),(3)) v(x)on true;
83+
select*from
84+
(selectcount(*)from tenk1where thousand>99) ss
85+
right join (values (1),(2),(3)) v(x)on true;
86+
87+
reset enable_material;
6888
reset enable_seqscan;
6989
reset enable_bitmapscan;
7090

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp