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: improve range underestimation #53860

Merged
merged 18 commits into from
Jun 16, 2024
Merged

Conversation

terry1purcell
Copy link
Contributor

@terry1purcell terry1purcell commented Jun 6, 2024

What problem does this PR solve?

Issue Number: close #53907

Problem Summary:

What changed and how does it work?

Range predicate estimation is changed to default to a minimum of 1/NDV for each of the low & high values (thus 2/NDV) which is consistent with the estimation used for 2 point-get values.

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-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 6, 2024
Copy link

ti-chi-bot bot commented Jun 6, 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.

@ti-chi-bot ti-chi-bot bot added the sig/planner SIG: Planner label Jun 6, 2024
Copy link

tiprow bot commented Jun 6, 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. do-not-merge/needs-linked-issue labels Jun 10, 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 10, 2024
@terry1purcell
Copy link
Contributor Author

/retest

Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.9339%. Comparing base (6ba9435) to head (bfca395).

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #53860         +/-   ##
=================================================
- Coverage   72.6829%   55.9339%   -16.7491%     
=================================================
  Files          1515       1637        +122     
  Lines        434590     606551     +171961     
=================================================
+ Hits         315873     339268      +23395     
- Misses        99395     243951     +144556     
- Partials      19322      23332       +4010     
Flag Coverage Δ
integration 37.0545% <100.0000%> (?)
unit 71.4998% <100.0000%> (-0.1800%) ⬇️

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

Components Coverage Δ
dumpling 52.9656% <ø> (ø)
parser ∅ <ø> (∅)
br 50.6095% <ø> (+8.3637%) ⬆️

pkg/statistics/histogram.go Outdated Show resolved Hide resolved
@terry1purcell terry1purcell requested review from qw4990 and winoros June 12, 2024 16:45
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 13, 2024
Copy link

ti-chi-bot bot commented Jun 13, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-13 15:10:05.122697156 +0000 UTC m=+650159.176009077: ☑️ agreed by winoros.

@qw4990
Copy link
Contributor

qw4990 commented Jun 16, 2024

/retest

@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 16, 2024
Copy link

ti-chi-bot bot commented Jun 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qw4990, winoros

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 merged commit a8af911 into pingcap:master Jun 16, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-1-more-lgtm Indicates a PR needs 1 more 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Range estimate not to go below equivalent point get estimate
4 participants