Skip to content

Commit 5a59315

Browse files
committed
Increase parallel bitmap scan test coverage.
Author: Dilip Kumar Discussion: https://postgr.es/m/20170331184603.qcp7t4md5bzxbx32@alap3.anarazel.de
1 parent 6f1b9aa commit 5a59315

File tree

2 files changed

+52
-8
lines changed

2 files changed

+52
-8
lines changed

src/test/regress/expected/select_parallel.out

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,22 +172,50 @@ reset enable_bitmapscan;
172172
-- test parallel bitmap heap scan.
173173
set enable_seqscan to off;
174174
set enable_indexscan to off;
175+
set enable_hashjoin to off;
176+
set enable_mergejoin to off;
177+
set enable_material to off;
178+
set effective_io_concurrency=50;
179+
set work_mem='64kB'; --set small work mem to force lossy pages
175180
explain (costs off)
176-
select count((unique1)) from tenk1 where hundred > 1;
181+
select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0;
177182
QUERY PLAN
178183
------------------------------------------------------------
179-
Finalize Aggregate
180-
-> Gather
181-
Workers Planned: 4
182-
-> Partial Aggregate
184+
Aggregate
185+
-> Nested Loop
186+
-> Seq Scan on tenk2
187+
Filter: (thousand = 0)
188+
-> Gather
189+
Workers Planned: 4
183190
-> Parallel Bitmap Heap Scan on tenk1
184191
Recheck Cond: (hundred > 1)
185192
-> Bitmap Index Scan on tenk1_hundred
186193
Index Cond: (hundred > 1)
187-
(8 rows)
194+
(10 rows)
195+
196+
select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0;
197+
count
198+
-------
199+
98000
200+
(1 row)
201+
202+
create table bmscantest (a int, t text);
203+
insert into bmscantest select r, 'fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' FROM generate_series(1,100000) r;
204+
create index i_bmtest ON bmscantest(a);
205+
select count(*) from bmscantest where a>1;
206+
count
207+
-------
208+
99999
209+
(1 row)
188210

189211
reset enable_seqscan;
190212
reset enable_indexscan;
213+
reset enable_hashjoin;
214+
reset enable_mergejoin;
215+
reset enable_material;
216+
reset effective_io_concurrency;
217+
reset work_mem;
218+
drop table bmscantest;
191219
-- test parallel merge join path.
192220
set enable_hashjoin to off;
193221
set enable_nestloop to off;

src/test/regress/sql/select_parallel.sql

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,28 @@ reset enable_bitmapscan;
6767
-- test parallel bitmap heap scan.
6868
set enable_seqscan to off;
6969
set enable_indexscan to off;
70-
70+
set enable_hashjoin to off;
71+
set enable_mergejoin to off;
72+
set enable_material to off;
73+
set effective_io_concurrency=50;
74+
set work_mem='64kB'; --set small work mem to force lossy pages
7175
explain (costs off)
72-
select count((unique1)) from tenk1 where hundred > 1;
76+
select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0;
77+
select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0;
78+
79+
create table bmscantest (a int, t text);
80+
insert into bmscantest select r, 'fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' FROM generate_series(1,100000) r;
81+
create index i_bmtest ON bmscantest(a);
82+
select count(*) from bmscantest where a>1;
7383

7484
reset enable_seqscan;
7585
reset enable_indexscan;
86+
reset enable_hashjoin;
87+
reset enable_mergejoin;
88+
reset enable_material;
89+
reset effective_io_concurrency;
90+
reset work_mem;
91+
drop table bmscantest;
7692

7793
-- test parallel merge join path.
7894
set enable_hashjoin to off;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy