mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Increase parallel bitmap scan test coverage.
Author: Dilip Kumar Discussion: https://postgr.es/m/20170331184603.qcp7t4md5bzxbx32@alap3.anarazel.de
This commit is contained in:
parent
6f1b9aaae3
commit
5a5931533e
@ -172,22 +172,50 @@ reset enable_bitmapscan;
|
|||||||
-- test parallel bitmap heap scan.
|
-- test parallel bitmap heap scan.
|
||||||
set enable_seqscan to off;
|
set enable_seqscan to off;
|
||||||
set enable_indexscan to off;
|
set enable_indexscan to off;
|
||||||
|
set enable_hashjoin to off;
|
||||||
|
set enable_mergejoin to off;
|
||||||
|
set enable_material to off;
|
||||||
|
set effective_io_concurrency=50;
|
||||||
|
set work_mem='64kB'; --set small work mem to force lossy pages
|
||||||
explain (costs off)
|
explain (costs off)
|
||||||
select count((unique1)) from tenk1 where hundred > 1;
|
select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0;
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
Finalize Aggregate
|
Aggregate
|
||||||
-> Gather
|
-> Nested Loop
|
||||||
Workers Planned: 4
|
-> Seq Scan on tenk2
|
||||||
-> Partial Aggregate
|
Filter: (thousand = 0)
|
||||||
|
-> Gather
|
||||||
|
Workers Planned: 4
|
||||||
-> Parallel Bitmap Heap Scan on tenk1
|
-> Parallel Bitmap Heap Scan on tenk1
|
||||||
Recheck Cond: (hundred > 1)
|
Recheck Cond: (hundred > 1)
|
||||||
-> Bitmap Index Scan on tenk1_hundred
|
-> Bitmap Index Scan on tenk1_hundred
|
||||||
Index Cond: (hundred > 1)
|
Index Cond: (hundred > 1)
|
||||||
(8 rows)
|
(10 rows)
|
||||||
|
|
||||||
|
select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0;
|
||||||
|
count
|
||||||
|
-------
|
||||||
|
98000
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
create table bmscantest (a int, t text);
|
||||||
|
insert into bmscantest select r, 'fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' FROM generate_series(1,100000) r;
|
||||||
|
create index i_bmtest ON bmscantest(a);
|
||||||
|
select count(*) from bmscantest where a>1;
|
||||||
|
count
|
||||||
|
-------
|
||||||
|
99999
|
||||||
|
(1 row)
|
||||||
|
|
||||||
reset enable_seqscan;
|
reset enable_seqscan;
|
||||||
reset enable_indexscan;
|
reset enable_indexscan;
|
||||||
|
reset enable_hashjoin;
|
||||||
|
reset enable_mergejoin;
|
||||||
|
reset enable_material;
|
||||||
|
reset effective_io_concurrency;
|
||||||
|
reset work_mem;
|
||||||
|
drop table bmscantest;
|
||||||
-- test parallel merge join path.
|
-- test parallel merge join path.
|
||||||
set enable_hashjoin to off;
|
set enable_hashjoin to off;
|
||||||
set enable_nestloop to off;
|
set enable_nestloop to off;
|
||||||
|
@ -67,12 +67,28 @@ reset enable_bitmapscan;
|
|||||||
-- test parallel bitmap heap scan.
|
-- test parallel bitmap heap scan.
|
||||||
set enable_seqscan to off;
|
set enable_seqscan to off;
|
||||||
set enable_indexscan to off;
|
set enable_indexscan to off;
|
||||||
|
set enable_hashjoin to off;
|
||||||
|
set enable_mergejoin to off;
|
||||||
|
set enable_material to off;
|
||||||
|
set effective_io_concurrency=50;
|
||||||
|
set work_mem='64kB'; --set small work mem to force lossy pages
|
||||||
explain (costs off)
|
explain (costs off)
|
||||||
select count((unique1)) from tenk1 where hundred > 1;
|
select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0;
|
||||||
|
select count(*) from tenk1, tenk2 where tenk1.hundred > 1 and tenk2.thousand=0;
|
||||||
|
|
||||||
|
create table bmscantest (a int, t text);
|
||||||
|
insert into bmscantest select r, 'fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' FROM generate_series(1,100000) r;
|
||||||
|
create index i_bmtest ON bmscantest(a);
|
||||||
|
select count(*) from bmscantest where a>1;
|
||||||
|
|
||||||
reset enable_seqscan;
|
reset enable_seqscan;
|
||||||
reset enable_indexscan;
|
reset enable_indexscan;
|
||||||
|
reset enable_hashjoin;
|
||||||
|
reset enable_mergejoin;
|
||||||
|
reset enable_material;
|
||||||
|
reset effective_io_concurrency;
|
||||||
|
reset work_mem;
|
||||||
|
drop table bmscantest;
|
||||||
|
|
||||||
-- test parallel merge join path.
|
-- test parallel merge join path.
|
||||||
set enable_hashjoin to off;
|
set enable_hashjoin to off;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user