Skip to content

perf-tuning: add column-prune.md (#3246)#3316

Merged
toutdesuite merged 4 commits into
pingcap:release-2.1from
ti-srebot:release-2.1-15bdb6ab4528
Jul 20, 2020
Merged

perf-tuning: add column-prune.md (#3246)#3316
toutdesuite merged 4 commits into
pingcap:release-2.1from
ti-srebot:release-2.1-15bdb6ab4528

Conversation

@ti-srebot
Copy link
Copy Markdown
Contributor

cherry-pick #3246 to release-2.1


What is changed, added or deleted? (Required)

add column-prune.md
Merge #3043 to fix CI failure

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

What is the related PR or file link(s)?

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot mentioned this pull request Jul 17, 2020
5 tasks
@ti-srebot ti-srebot added the type/cherry-pick-for-release-2.1 This PR is cherry-picked to release-2.1 from a source PR. label Jul 17, 2020
@ti-srebot ti-srebot requested a review from TomShawn July 17, 2020 06:47
@ti-srebot
Copy link
Copy Markdown
Contributor Author

@toutdesuite please accept the invitation then you can push to the cherry-pick pull requests.
https://github.com/ti-srebot/docs/invitations

Comment thread TOC.md Outdated
- [TiDB Troubleshooting Map](/tidb-troubleshooting-map.md)
- [Troubleshoot Cluster Setup](/troubleshoot-tidb-cluster.md)
- [Troubleshoot TiDB Lightning](/troubleshoot-tidb-lightning.md)
=======
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@toutdesuite Please resolve the conflict. Be careful about the version difference.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@TomShawn Resolved. PTAL~

Copy link
Copy Markdown
Contributor

@TomShawn TomShawn left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 20, 2020
Comment thread column-pruning.md Outdated

In this query, only column a and column b are used, and column c and column d are redundant. Regarding the query plan of this statement, the `Selection` operator uses column b. Then the `DataSource` operator uses columns a and column b. Columns c and column d can be pruned because the `DataSource` operator does not read them.

Therefore, when TiDB performs a top-down scanning during the logic optimization phase, redundant columns are pruned to reduce waste of resources. This scanning process is called "Column Pruning", corresponding to the `columnPruner` rule. If you want to disable this rule, refer to [The Blocklist of Optimization Rules and Expression Pushdown](/blocklist-control-plan.md).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Therefore, when TiDB performs a top-down scanning during the logic optimization phase, redundant columns are pruned to reduce waste of resources. This scanning process is called "Column Pruning", corresponding to the `columnPruner` rule. If you want to disable this rule, refer to [The Blocklist of Optimization Rules and Expression Pushdown](/blocklist-control-plan.md).
Therefore, when TiDB performs a top-down scanning during the logic optimization phase, redundant columns are pruned to reduce waste of resources. This scanning process is called "Column Pruning", corresponding to the `columnPruner` rule. If you want to disable this rule, refer to [The Blocklist of Optimization Rules and Expression Pushdown](https://docs.pingcap.com/tidb/dev/blocklist-control-plan).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@toutdesuite toutdesuite Jul 20, 2020

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But users might wonder how to disable this rule.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

updated~

Comment thread column-pruning.md Outdated
@toutdesuite toutdesuite merged commit b3228cb into pingcap:release-2.1 Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/LGT1 Indicates that a PR has LGTM 1. type/cherry-pick-for-release-2.1 This PR is cherry-picked to release-2.1 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants