planner: increase default concurrency factor of cost computing#11752
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11752 +/- ##
===============================================
- Coverage 81.776% 81.5477% -0.2284%
===============================================
Files 434 433 -1
Lines 94107 93506 -601
===============================================
- Hits 76957 76252 -705
- Misses 11684 11838 +154
+ Partials 5466 5416 -50 |
Contributor
Author
|
/run-all-tests |
alivxxx
reviewed
Aug 16, 2019
| IndexReader_11 1104.45 root index:Selection_10 | ||
| └─Selection_10 1104.45 cop lt(test.access_path_selection.b, 3) | ||
| └─IndexScan_9 3323.33 cop table:access_path_selection, index:a, b, range:[-inf,3), keep order:false, stats:pseudo | ||
| CREATE TABLE `outdated_statistics` ( |
Contributor
Author
There was a problem hiding this comment.
Because this case is intended to test that planner would prefer idx_ab over idx_a, but it is hard to say whether double read using idx_ab is better than table scan or not. With the new concurrency factor, planner would prefer table scan, because there are only 6 rows in total.
alivxxx
approved these changes
Aug 16, 2019
Contributor
|
/run-all-tests |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem does this PR solve?
#10581 incurs 2.19% performance regression of oltp_read_write workload, this PR resolves this regression.
What is changed and how it works?
The performance regression is caused by the fact that: oltp_read_write contains a class of aggregation quires without Group By, the new cost model would prefer HashAgg which would run in parallel, while the old cost model prefers single-threaded StreamAgg. According to the actual benchmark, single-threaded StreamAgg is a little bit faster than multi-threaded HashAgg for this kind of query.
This PR adjust default concurrency factor to make planner prefer StreamAgg for this kind of query.
Check List
Tests
Code changes
N/A
Side effects
N/A
Related changes
N/A