Skip to content
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: increase tablescan cost for high risk scenarios | tidb-test=pr/2399 #56203

Merged
merged 43 commits into from
Sep 26, 2024

Conversation

terry1purcell
Copy link
Contributor

@terry1purcell terry1purcell commented Sep 21, 2024

What problem does this PR solve?

Issue Number: close #56012

Problem Summary:

What changed and how does it work?

Add a cost penalty to table scan if we encounter a scenario where a table scan may be risky or we should be preferencing away from table scan.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

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

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed sig/planner SIG: Planner size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 21, 2024
Copy link

tiprow bot commented Sep 21, 2024

Hi @terry1purcell. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@terry1purcell
Copy link
Contributor Author

/check-issue-triage-complete

@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 21, 2024
Copy link

codecov bot commented Sep 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.3432%. Comparing base (448d569) to head (81b3d99).
Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56203        +/-   ##
================================================
+ Coverage   73.3954%   75.3432%   +1.9477%     
================================================
  Files          1624       1624                
  Lines        447375     447484       +109     
================================================
+ Hits         328353     337149      +8796     
+ Misses        98883      89806      -9077     
- Partials      20139      20529       +390     
Flag Coverage Δ
integration 49.0787% <100.0000%> (?)
unit 72.4554% <100.0000%> (-0.0516%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 52.2484% <ø> (+6.7190%) ⬆️

@terry1purcell terry1purcell changed the title planner: increase tablescan cost for high risk scenarios planner: increase tablescan cost for high risk scenarios | tdb-test=pr/2399 Sep 21, 2024
@terry1purcell terry1purcell changed the title planner: increase tablescan cost for high risk scenarios | tdb-test=pr/2399 planner: increase tablescan cost for high risk scenarios | tidb-test=pr/2399 Sep 21, 2024
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 21, 2024
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 21, 2024
@terry1purcell
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Sep 22, 2024

@terry1purcell: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@terry1purcell
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 26, 2024
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 26, 2024
@winoros
Copy link
Member

winoros commented Sep 26, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit a3a4511 into pingcap:master Sep 26, 2024
23 checks passed
@terry1purcell terry1purcell deleted the tablescan branch September 28, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

optimizer picks wrong driving table in nested loop join
7 participants