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

Add explaination about tidb_allow_batch_cop #3265

Merged
merged 7 commits into from
May 26, 2020

Conversation

JaySon-Huang
Copy link
Contributor

Signed-off-by: JaySon-Huang tshent@qq.com

What is changed, added or deleted? (Required)

Add explaination about a new system variable tidb_allow_batch_cop to tidb-specific-variables.md and tiflash/tune-tiflash-performance.md

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: JaySon-Huang <tshent@qq.com>
@JaySon-Huang JaySon-Huang added status/PTAL This PR is ready for reviewing. needs-cherry-pick-4.0 labels May 22, 2020
@TomShawn TomShawn requested review from kissmydb and lidezhu and removed request for kissmydb and lidezhu May 22, 2020 09:24
@TomShawn
Copy link
Contributor

@JaySon-Huang 这个 PR 是否为 docs-special-week 的 PR 呢?如果是,请将 branch rebase 到 docs-special-week。

@JaySon-Huang
Copy link
Contributor Author

@TomShawn 有一个新功能开发完,在4.0GA会带出去,但是之前没有补充相关的文档说明。没有在 special-week 原计划内。

tidb-specific-system-variables.md Outdated Show resolved Hide resolved
tidb-specific-system-variables.md Outdated Show resolved Hide resolved
@@ -22,10 +22,30 @@ aliases: ['/docs-cn/dev/reference/tiflash/tune-performance/']
set @@tidb_distsql_scan_concurrency = 80;
```

2. 开启聚合推过 JOIN / UNION 等 TiDB 算子的优化:
2. 开启 Super batch 功能:
这个变量用来设置从 TiFlash 读取时,是否把 region 的请求进行合并。当查询中涉及的 region 数量比较大,可以尝试设置该变量为 1:对带 aggregation 的 TiFlash coprocess 请求生效;设置该变量为 2:对全部的 TiFlash coprocessor 请求生效。
Copy link
Contributor

Choose a reason for hiding this comment

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

  • 这个变量是什么变量呢?请明确写出变量名,最好能附上 tidb-specific-system-variables.md 里的链接。
  • region 的首字母为大写。


{{< copyable "sql" >}}

```sql
set @@tidb_opt_agg_push_down = 1;
```

4. 尝试开启 `Distince` 推过 `Join` / `Union` 等 TiDB 算子的优化:
这个变量用来设置优化器是否执行带有 `Distinct` 的聚合函数(比如 `select count(distinct a) from t`)下推到 Coprocessor 的优化操作。
Copy link
Contributor

Choose a reason for hiding this comment

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

这个变量是什么变量呢?请明确写出变量名,最好能附上 tidb-specific-system-variables.md 里的链接。


4. 尝试开启 `Distince` 推过 `Join` / `Union` 等 TiDB 算子的优化:
这个变量用来设置优化器是否执行带有 `Distinct` 的聚合函数(比如 `select count(distinct a) from t`)下推到 Coprocessor 的优化操作。
当查询中带有 `Distinct` 的聚合操作执行很慢时,可以尝试设置该变量为 `1`。
Copy link
Contributor

Choose a reason for hiding this comment

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

如需换行,请在两行之间插入空行,否则会显示无换行。

JaySon-Huang and others added 4 commits May 22, 2020 18:24
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
@sre-bot
Copy link
Contributor

sre-bot commented May 24, 2020

@TomShawn, @hanfei1991, PTAL.

@TomShawn TomShawn self-requested a review May 25, 2020 02:30
@hanfei1991
Copy link
Member

LGTM

Copy link
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

@yikeke
Copy link
Contributor

yikeke commented May 26, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 26, 2020
@sre-bot
Copy link
Contributor

sre-bot commented May 26, 2020

/run-all-tests

@sre-bot sre-bot merged commit adaf792 into pingcap:master May 26, 2020
@JaySon-Huang JaySon-Huang deleted the tune-tiflash-perf branch May 26, 2020 14:28
@yikeke
Copy link
Contributor

yikeke commented May 29, 2020

/run-cherry-picker

sre-bot pushed a commit to sre-bot/docs-cn that referenced this pull request May 29, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented May 29, 2020

cherry pick to release-4.0 in PR #3403

yikeke pushed a commit that referenced this pull request May 29, 2020
* cherry pick #3265 to release-4.0

Signed-off-by: sre-bot <sre-bot@pingcap.com>

* resolve conflicts

Co-authored-by: JaySon <tshent@qq.com>
Co-authored-by: yikeke <yikeke@pingcap.com>
@TomShawn TomShawn self-requested a review May 31, 2020 04:07
@yikeke yikeke added the translation/doing This PR’s assignee is translating this PR. label Jun 12, 2020
@yikeke yikeke assigned CaitinChen and unassigned toutdesuite Jun 19, 2020
@yikeke yikeke added the size/medium Changes of a medium size. label Jun 19, 2020
@yikeke yikeke added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/medium Changes of a medium size. status/can-merge Indicates a PR has been approved by a committer. status/PTAL This PR is ready for reviewing. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants