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

statsitstics: avoid sync load column which is skiped type to analyze #57144

Merged
merged 5 commits into from
Nov 21, 2024

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Nov 5, 2024

What problem does this PR solve?

Issue Number: close #57138

Problem Summary:

What changed and how does it work?

Sometimes, we disable the analysis of certain columns using analyze_skip_column. However, these columns may still retain outdated statistics, especially after being modified. Since their statistics are larger, syncing them via sync load can be very slow and prone to timeouts. To address this, we filter out these columns.

image

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.

statsitstics: avoid sync load column which is skiped to analyze

避免将 skip analyze 的列通过 sync load 加载

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 75.8153%. Comparing base (938ed70) to head (f5d8d26).
Report is 65 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #57144        +/-   ##
================================================
+ Coverage   72.8995%   75.8153%   +2.9157%     
================================================
  Files          1672       1721        +49     
  Lines        462265     487420     +25155     
================================================
+ Hits         336989     369539     +32550     
+ Misses       104535      95880      -8655     
- Partials      20741      22001      +1260     
Flag Coverage Δ
integration 50.5440% <76.9230%> (?)
unit 73.4447% <53.8461%> (+1.1620%) ⬆️

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

Components Coverage Δ
dumpling 52.7673% <ø> (ø)
parser ∅ <ø> (∅)
br 60.6404% <ø> (+15.5239%) ⬆️
---- 🚨 Try these New Features:

@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 13, 2024
@hawkingrei
Copy link
Member Author

/retest

1 similar comment
@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Nov 16, 2024
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
@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 Nov 19, 2024
@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 19, 2024
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

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

ti-chi-bot bot commented Nov 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-19 15:01:37.580551171 +0000 UTC m=+973259.771420167: ☑️ agreed by winoros.
  • 2024-11-21 06:55:36.343765854 +0000 UTC m=+101123.963420370: ☑️ agreed by AilinKid.

@hawkingrei
Copy link
Member Author

/hold

@elsa0520 PTAL

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 21, 2024
Copy link
Contributor

@elsa0520 elsa0520 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Nov 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, elsa0520, 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

@elsa0520 elsa0520 changed the title statsitstics: avoid sync load column which is skiped to analyze statsitstics: avoid sync load column which is skiped type to analyze Nov 21, 2024
@hawkingrei
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 21, 2024
@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit bfec732 into pingcap:master Nov 21, 2024
25 checks passed
@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. labels Nov 22, 2024
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Nov 22, 2024
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-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sync load forget to skip the column which is in the tidb_analyze_skip_column_types
5 participants