Consider parallel merge joins.

Commit 45be99f8cd5d606086e0a458c9c72910ba8a613d took the position
that performing a merge join in parallel was not likely to work out
well, but this conclusion was greeted with skepticism even at the
time.  Whether it was true then or not, it's clearly not true any
more now that we have parallel index scan.

Dilip Kumar, reviewed by Amit Kapila and by me.

Discussion: http://postgr.es/m/CAFiTN-v3=cM6nyFwFGp0fmvY4=kk79Hq9Fgu0u8CSJ-EEq1Tiw@mail.gmail.com
This commit is contained in:
Robert Haas
2017-03-07 11:49:49 -05:00
parent ef26623944
commit 3bc7dafa9b
3 changed files with 275 additions and 19 deletions

View File

@ -64,6 +64,16 @@ select count(*) from tenk1 where thousand > 95;
reset enable_seqscan;
reset enable_bitmapscan;
-- test parallel merge join path.
set enable_hashjoin to off;
set enable_nestloop to off;
explain (costs off)
select count(*) from tenk1, tenk2 where tenk1.unique1 = tenk2.unique1;
select count(*) from tenk1, tenk2 where tenk1.unique1 = tenk2.unique1;
reset enable_hashjoin;
reset enable_nestloop;
set force_parallel_mode=1;
explain (costs off)