pingcap / tidb

TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.
https://pingcap.com
Apache License 2.0
37.37k stars 5.86k forks source link

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

Open ti-chi-bot opened 3 days ago

ti-chi-bot commented 3 days ago

This is an automated cherry-pick of #57144

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

Side effects

Documentation

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 加载
ti-chi-bot[bot] commented 3 days ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign qw4990 for approval. For more information see the Code Review Process.

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

Needs approval from an approver in each of these files: - **[pkg/statistics/OWNERS](https://github.com/pingcap/tidb/blob/release-8.1/pkg/statistics/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
codecov[bot] commented 3 days ago

Codecov Report

Attention: Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.

Please upload report for BASE (release-8.1@a55ea35). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-8.1 #57616 +/- ## ================================================ Coverage ? 71.1944% ================================================ Files ? 1467 Lines ? 423369 Branches ? 0 ================================================ Hits ? 301415 Misses ? 101441 Partials ? 20513 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb/pull/57616/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/pingcap/tidb/pull/57616/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `71.1944% <53.8461%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/pingcap/tidb/pull/57616/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [dumpling](https://app.codecov.io/gh/pingcap/tidb/pull/57616/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `52.9656% <0.0000%> (?)` | | | [parser](https://app.codecov.io/gh/pingcap/tidb/pull/57616/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `∅ <0.0000%> (?)` | | | [br](https://app.codecov.io/gh/pingcap/tidb/pull/57616/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `41.2786% <0.0000%> (?)` | |

🚨 Try these New Features: