-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
Signed-off-by: JaySon-Huang <tshent@qq.com>
@JaySon-Huang 这个 PR 是否为 docs-special-week 的 PR 呢?如果是,请将 branch rebase 到 docs-special-week。 |
@TomShawn 有一个新功能开发完,在4.0GA会带出去,但是之前没有补充相关的文档说明。没有在 special-week 原计划内。 |
tiflash/tune-tiflash-performance.md
Outdated
@@ -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 请求生效。 |
There was a problem hiding this comment.
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 的首字母为大写。
tiflash/tune-tiflash-performance.md
Outdated
|
||
{{< copyable "sql" >}} | ||
|
||
```sql | ||
set @@tidb_opt_agg_push_down = 1; | ||
``` | ||
|
||
4. 尝试开启 `Distince` 推过 `Join` / `Union` 等 TiDB 算子的优化: | ||
这个变量用来设置优化器是否执行带有 `Distinct` 的聚合函数(比如 `select count(distinct a) from t`)下推到 Coprocessor 的优化操作。 |
There was a problem hiding this comment.
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
里的链接。
tiflash/tune-tiflash-performance.md
Outdated
|
||
4. 尝试开启 `Distince` 推过 `Join` / `Union` 等 TiDB 算子的优化: | ||
这个变量用来设置优化器是否执行带有 `Distinct` 的聚合函数(比如 `select count(distinct a) from t`)下推到 Coprocessor 的优化操作。 | ||
当查询中带有 `Distinct` 的聚合操作执行很慢时,可以尝试设置该变量为 `1`。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如需换行,请在两行之间插入空行,否则会显示无换行。
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
@TomShawn, @hanfei1991, PTAL. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
/run-cherry-picker |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-4.0 in PR #3403 |
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.mdWhich TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?