Skip to content

planner: enable the new cost implementation by default#34567

Merged
ti-chi-bot merged 16 commits intopingcap:masterfrom
qw4990:cost-refactor-enable
May 16, 2022
Merged

planner: enable the new cost implementation by default#34567
ti-chi-bot merged 16 commits intopingcap:masterfrom
qw4990:cost-refactor-enable

Conversation

@qw4990
Copy link
Contributor

@qw4990 qw4990 commented May 11, 2022

What problem does this PR solve?

Issue Number: close #33945

Problem Summary: planner: enable the new cost implementation by default

What is changed and how it works?

planner: enable the new cost implementation by default

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@qw4990 qw4990 requested a review from a team as a code owner May 11, 2022 07:22
@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 11, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Reminiscent
  • time-and-fate

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels May 11, 2022
@ti-chi-bot ti-chi-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 11, 2022
@qw4990
Copy link
Contributor Author

qw4990 commented May 11, 2022

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented May 11, 2022

/rebuild

@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 12, 2022
@qw4990 qw4990 changed the title [WIP]planner: enable the new cost implementation by default planner: enable the new cost implementation by default May 16, 2022
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 16, 2022
@qw4990
Copy link
Contributor Author

qw4990 commented May 16, 2022

/run-mysql-test

@sre-bot
Copy link
Contributor

sre-bot commented May 16, 2022

@qw4990 qw4990 added the sig/planner SIG: Planner label May 16, 2022
Comment on lines -5408 to +5409
` └─Selection_8 1.25 0.00 cop[tikv] not(isnull(test.t_inner_idx.a))`,
` └─IndexRangeScan_7 1.25 0.00 cop[tikv] table:t_inner_idx, index:a(a) range: decided by [eq(test.t_inner_idx.a, test.t_outer.a)], keep order:false, stats:pseudo`))
` └─Selection_8 1.25 58.18 cop[tikv] not(isnull(test.t_inner_idx.a))`,
` └─IndexRangeScan_7 1.25 54.43 cop[tikv] table:t_inner_idx, index:a(a) range: decided by [eq(test.t_inner_idx.a, test.t_outer.a)], keep order:false, stats:pseudo`))
Copy link
Contributor Author

@qw4990 qw4990 May 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cost changes like 0.00 -> xxx are expected since the old cost implementation cannot trace operators' costs well so some of them are not set, but in our new cost implementation, every operator's cost can be traced naturally.

@qw4990
Copy link
Contributor Author

qw4990 commented May 16, 2022

/run-unit-test

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 16, 2022
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 16, 2022
@qw4990
Copy link
Contributor Author

qw4990 commented May 16, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 0ab6f0b

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 16, 2022
@qw4990
Copy link
Contributor Author

qw4990 commented May 16, 2022

/run-mysql-test

@qw4990
Copy link
Contributor Author

qw4990 commented May 16, 2022

/rebuild

@morgo
Copy link
Contributor

morgo commented May 16, 2022

/merge

@qw4990
Copy link
Contributor Author

qw4990 commented May 16, 2022

/run-mysql-test

@ti-chi-bot ti-chi-bot merged commit 683ba09 into pingcap:master May 16, 2022
@sre-bot
Copy link
Contributor

sre-bot commented May 16, 2022

TiDB MergeCI notify

🔴 Bad News! [1] CI still failing after this pr merged.
These failed integration tests don't seem to be introduced by the current PR.

CI Name Result Duration Compare with Parent commit
idc-jenkins-ci-tidb/common-test 🔴 failed 1, success 11, total 12 5 min 45 sec Existing failure
idc-jenkins-ci/integration-cdc-test 🟢 all 34 tests passed 22 min Existing passed
idc-jenkins-ci-tidb/integration-common-test 🟢 all 11 tests passed 9 min 38 sec Existing passed
idc-jenkins-ci-tidb/tics-test 🟢 all 1 tests passed 6 min 24 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-1 🟢 all 26 tests passed 6 min 9 sec Existing passed
idc-jenkins-ci-tidb/sqllogic-test-2 🟢 all 28 tests passed 5 min 55 sec Existing passed
idc-jenkins-ci-tidb/integration-ddl-test 🟢 all 6 tests passed 5 min 27 sec Existing passed
idc-jenkins-ci-tidb/mybatis-test 🟢 all 1 tests passed 3 min 14 sec Existing passed
idc-jenkins-ci-tidb/integration-compatibility-test 🟢 all 1 tests passed 3 min 5 sec Existing passed
idc-jenkins-ci-tidb/plugin-test 🟢 build success, plugin test success 4min Existing passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

planner: refactor the implementation of cost calculation

6 participants