Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 236
Enable Parallel-oblivious Hash Left Anti Semi (Not-In) Join#30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
avamingli
merged 1 commit into
apache:main
from
avamingli:enable_parallel_oblivious_lasj_hashjoinAug 9, 2023
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1590,6 +1590,81 @@ select * from t1 order by c2 asc limit 3 offset 5; | ||
| abort; | ||
| -- | ||
| -- Test Parallel Hash Left Anti Semi (Not-In) Join(parallel-oblivious). | ||
| -- | ||
| create table t1(c1 int, c2 int) using ao_row distributed by (c1); | ||
| create table t2(c1 int, c2 int) using ao_row distributed by (c1); | ||
| create table t3_null(c1 int, c2 int) using ao_row distributed by (c1); | ||
| set enable_parallel = on; | ||
| set gp_appendonly_insert_files = 2; | ||
| set gp_appendonly_insert_files_tuples_range = 100; | ||
| set max_parallel_workers_per_gather = 2; | ||
avamingli marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| insert into t1 select i, i from generate_series(1, 5000000) i; | ||
| insert into t2 select i+1, i from generate_series(1, 1200) i; | ||
| insert into t3_null select i+1, i from generate_series(1, 1200) i; | ||
| insert into t3_null values(NULL, NULL); | ||
| analyze t1; | ||
| analyze t2; | ||
| analyze t3_null; | ||
| explain(costs off) select sum(t1.c1) from t1 where c1 not in (select c1 from t2); | ||
| QUERY PLAN | ||
| --------------------------------------------------------------------------- | ||
| Finalize Aggregate | ||
| -> Gather Motion 6:1 (slice1; segments: 6) | ||
| -> Partial Aggregate | ||
| -> Hash Left Anti Semi (Not-In) Join | ||
| Hash Cond: (t1.c1 = t2.c1) | ||
| -> Parallel Seq Scan on t1 | ||
| -> Hash | ||
| -> Broadcast Motion 3:6 (slice2; segments: 3) | ||
| -> Seq Scan on t2 | ||
| Optimizer: Postgres query optimizer | ||
| (10 rows) | ||
| select sum(t1.c1) from t1 where c1 not in (select c1 from t2); | ||
| sum | ||
| ---------------- | ||
| 12500001778200 | ||
| (1 row) | ||
| explain(costs off) select * from t1 where c1 not in (select c1 from t3_null); | ||
| QUERY PLAN | ||
| --------------------------------------------------------------- | ||
| Gather Motion 6:1 (slice1; segments: 6) | ||
| -> Hash Left Anti Semi (Not-In) Join | ||
| Hash Cond: (t1.c1 = t3_null.c1) | ||
| -> Parallel Seq Scan on t1 | ||
| -> Hash | ||
| -> Broadcast Motion 3:6 (slice2; segments: 3) | ||
| -> Seq Scan on t3_null | ||
| Optimizer: Postgres query optimizer | ||
| (8 rows) | ||
| select * from t1 where c1 not in (select c1 from t3_null); | ||
| c1 | c2 | ||
| ----+---- | ||
| (0 rows) | ||
| -- non-parallel results. | ||
| set enable_parallel = off; | ||
| select sum(t1.c1) from t1 where c1 not in (select c1 from t2); | ||
| sum | ||
| ---------------- | ||
| 12500001778200 | ||
| (1 row) | ||
| select * from t1 where c1 not in (select c1 from t3_null); | ||
| c1 | c2 | ||
| ----+---- | ||
| (0 rows) | ||
| drop table t1; | ||
| drop table t2; | ||
| drop table t3_null; | ||
| -- | ||
| -- End of Test Parallel Hash Left Anti Semi (Not-In) Join. | ||
| -- | ||
| -- | ||
| -- Test alter ao/aocs table parallel_workers options | ||
| -- | ||
| begin; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.