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: Do not allow cardinality to go below 1 | tidb-test=pr/2376 #55242

Merged
merged 38 commits into from
Aug 20, 2024

Conversation

terry1purcell
Copy link
Contributor

@terry1purcell terry1purcell commented Aug 7, 2024

What problem does this PR solve?

Issue Number: close #47400

Problem Summary:

What changed and how does it work?

Ensure that the cardinality estimate does not go below 1. As the estimate approaches zero, then all plans are inexpensive which makes it difficult for the optimizer to differentiate the plan choices.

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 do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 7, 2024
Copy link

ti-chi-bot bot commented Aug 7, 2024

Hi @terry1purcell. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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/test-infra repository.

Copy link

tiprow bot commented Aug 7, 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.

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Aug 7, 2024
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.8117%. Comparing base (bab3667) to head (5dd856b).
Report is 1128 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55242        +/-   ##
================================================
+ Coverage   74.9822%   75.8117%   +0.8295%     
================================================
  Files          1576       1608        +32     
  Lines        365580     463391     +97811     
================================================
+ Hits         274120     351305     +77185     
- Misses        71731      91347     +19616     
- Partials      19729      20739      +1010     
Flag Coverage Δ
integration 52.0432% <100.0000%> (?)
unit 72.9690% <72.7272%> (-1.0139%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) ⬇️
parser ∅ <ø> (∅)
br 53.4677% <ø> (+5.6493%) ⬆️

@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 Aug 7, 2024
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 7, 2024
Copy link

ti-chi-bot bot commented Aug 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, qw4990, Rustin170506

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 20, 2024
Copy link

ti-chi-bot bot commented Aug 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-20 08:42:29.016761824 +0000 UTC m=+254944.151211947: ☑️ agreed by qw4990.
  • 2024-08-20 09:25:02.677164186 +0000 UTC m=+257497.811614308: ☑️ agreed by cfzjywxk.

@ti-chi-bot ti-chi-bot bot merged commit f2c278d into pingcap:master Aug 20, 2024
23 checks passed
@terry1purcell terry1purcell deleted the minonerow branch August 20, 2024 12:48
breezewish added a commit that referenced this pull request Aug 21, 2024
…e-upstream

* origin/master:
  parser:  call `SetText` correctly for `CreateViewStmt` (#55520)
  lighting: expose limited fields for `kv.Session` (#55517)
  show: prefilter table name with like pattern and show full tables (#55396)
  Planner: Do not allow cardinality to go below 1 (#55242)
  *: replace maps.Copy which is for map clone with std maps.Clone (#55530)
  infoschema: add WithRefillOption for TableByName and TableByID (#55511)
  domain: change groupSize in splitForConcurrentFetch (#55518)
  ddl: fix resuming to wrong checkpoint when failed during adding index (#55506)
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Nov 7, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Nov 7, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #57217.

@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label Dec 11, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #58150.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 11, 2024
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Dec 11, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #58173.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 11, 2024
hawkingrei pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 12, 2024
hawkingrei pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 13, 2024
@hawkingrei
Copy link
Member

/cherrypick release-7.5

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.5 from head ti-chi-bot:cherry-pick-55242-to-release-7.5: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-55242-to-release-7.5."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request","status":"422"}

In response to this:

/cherrypick release-7.5

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 ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 13, 2024
@ti-chi-bot ti-chi-bot bot removed the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Dec 13, 2024
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. label Jan 21, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #59074.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

planner: zero estimation result if all values are in TopN
6 participants