@@ -172,22 +172,50 @@ reset enable_bitmapscan;
172
172
-- test parallel bitmap heap scan.
173
173
set enable_seqscan to off;
174
174
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
175
180
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 ;
177
182
QUERY PLAN
178
183
------------------------------------------------------------
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
183
190
-> Parallel Bitmap Heap Scan on tenk1
184
191
Recheck Cond: (hundred > 1)
185
192
-> Bitmap Index Scan on tenk1_hundred
186
193
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)
188
210
189
211
reset enable_seqscan;
190
212
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;
191
219
-- test parallel merge join path.
192
220
set enable_hashjoin to off;
193
221
set enable_nestloop to off;
0 commit comments