-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
planner: update cost model2 #39438
planner: update cost model2 #39438
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-build-arm64 comment=true |
download tidb binary(linux arm64) at http://fileserver.pingcap.net/download/builds/pingcap/test/tidb/3be764e21287d8b1314fdbe5d8508032ad92921e/centos7/tidb-linux-arm64.tar.gz |
@@ -364,7 +364,7 @@ func TestCheckActRowsWithUnistore(t *testing.T) { | |||
}, | |||
{ | |||
sql: "select count(*) from t_unistore_act_rows group by b", | |||
expected: []string{"2", "2", "2", "4"}, | |||
expected: []string{"2", "4", "4"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected, not push Agg down.
` └─TableReader_13(Probe) 0.00 root data:Selection_12`, | ||
` └─Selection_12 0.00 cop[tikv] eq(test.t1.a, 1)`, | ||
` └─TableRangeScan_11 0.80 cop[tikv] table:t1 range: decided by [eq(test.t1.a, test.t2.a)], keep order:false, stats:pseudo`)) | ||
`└─MergeJoin_10 1.00 root inner join, left key:test.t2.a, right key:test.t1.a`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected, MergeJoin is more cpu-effective if data-size is small.
@@ -1479,7 +1479,7 @@ func TestIndexNestedLoopHashJoin(t *testing.T) { | |||
" └─TableRowIDScan 27.00 cop[tikv] table:l2 keep order:false")) | |||
tk.MustQuery("select * from t l1 where exists ( select * from t l2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey )order by `l_orderkey`,`l_linenumber`;").Check(testkit.Rows("0 0 0 0", "0 1 0 1", "0 2 0 0", "1 0 1 0", "1 1 1 1", "1 2 1 0", "2 0 0 0", "2 1 0 1", "2 2 0 0")) | |||
tk.MustQuery("desc format = 'brief' select count(*) from t l1 where exists ( select * from t l2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey );").Check(testkit.Rows( | |||
"HashAgg 1.00 root funcs:count(1)->Column#11", | |||
"StreamAgg 1.00 root funcs:count(1)->Column#11", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected, StreamAgg is more cpu-effective if data-size is small.
@@ -123,23 +123,23 @@ | |||
"operator_info": "data:TableFullScan_16" | |||
} | |||
], | |||
"cost": 975351.9825195674, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected, just update cost values.
@@ -7,10 +7,9 @@ | |||
"Plan": [ | |||
"HashJoin 2.25 root inner join, equal:[eq(test.t1.a, test.t2.a) eq(test.t1.b, test.t2.b)]", | |||
"├─HashAgg(Build) 1.69 root group by:test.t2.a, test.t2.b, funcs:firstrow(test.t2.a)->test.t2.a, funcs:firstrow(test.t2.b)->test.t2.b", | |||
"│ └─TableReader 1.69 root data:HashAgg", | |||
"│ └─HashAgg 1.69 cop[tikv] group by:test.t2.a, test.t2.b, ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected, not push Agg down if data-size is small.
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 83c2880
|
/merge |
/merge |
/run-all-tests |
1 similar comment
/run-all-tests |
/run-build-arm64 comment=true |
download tidb binary(linux arm64) at http://fileserver.pingcap.net/download/builds/pingcap/test/tidb/e5a7dc8aebe6daef9c5c82875819789bb87357c4/centos7/tidb-linux-arm64.tar.gz |
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
What problem does this PR solve?
Issue Number: ref #35240
Problem Summary: planner: update cost model2
What is changed and how it works?
planner: update cost model2
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.