-
Notifications
You must be signed in to change notification settings - Fork 1.2k
system-variables: document global tidb_paging_size_bytes #21752
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
base: master
Are you sure you want to change the base?
Changes from all commits
0a4e26f
684e35b
201b47f
7e6027e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4745,6 +4745,22 @@ SHOW WARNINGS; | |
| - 范围:`[0, 2147483647]` | ||
| - 控制优化器估算逻辑的更迭。更改该变量值后,优化器的估算逻辑会产生较大的改变。目前该变量的有效值只有 `0`,不建议设为其它值。 | ||
|
|
||
| ### `tidb_paging_size_bytes` <span class="version-mark">从 v9.0.0 版本开始引入</span> | ||
|
|
||
| - 作用域:GLOBAL | ||
| - 是否持久化到集群:是 | ||
| - 是否受 Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value) 控制:否 | ||
| - 类型:整数型 | ||
| - 默认值:`0` | ||
| - 范围:`[0, 9223372036854775807]` | ||
| - 单位:字节 | ||
| - 该变量用于设置 TiKV coprocessor 请求的每页字节预算,仅在开启[资源管控](/tidb-resource-control-ru-groups.md)且当前语句所属资源组具有有限突发额度时生效。对于 `BURSTABLE=UNLIMITED` 的资源组,该预算不生效。 | ||
| - 按字节数分页与 [`tidb_enable_paging`](#tidb_enable_paging-从-v540-版本开始引入) 控制的按行数分页相互独立。将该变量设为 `0` 仅关闭按字节数分页,不影响按行数分页;关闭 `tidb_enable_paging` 也不会关闭按字节数分页。 | ||
| - 使用 `SET GLOBAL tidb_paging_size_bytes = ...` 修改该变量。更新对当前 TiDB 实例上已有连接和新建连接的后续语句生效,包括已开启事务中的后续语句,无需重新连接。语句在初始化分布式执行上下文时读取本实例的全局值;已初始化的执行上下文及其分页请求保留原有预算。其他 TiDB 实例通过系统变量缓存异步同步该值,因此各实例不保证同时生效。 | ||
| - 不支持通过 `SET SESSION` 或未指定作用域的 `SET` 修改该变量,这两种操作都会返回错误。使用 `SET_VAR` Hint 会产生警告,且不会覆盖全局值。可以通过 `@@GLOBAL.tidb_paging_size_bytes` 或 `@@tidb_paging_size_bytes` 查询当前实例的全局值。 | ||
|
Comment on lines
+4750
to
+4760
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: rg -n "tidb_paging_size_bytes|TiDBPagingSizeBytes" . --glob '!system-variables.md'Repository: pingcap/docs-cn Length of output: 153 🏁 Script executed: sed -n '4735,4768p' system-variables.md
printf '\n--- related local references ---\n'
rg -n -i "paging|SET_VAR|作用域:SESSION|作用域:GLOBAL" system-variables.md | head -120
printf '\n--- tracked candidate files ---\n'
git ls-files | rg -i 'system.variables|variable|tidb.*(source|sql)|optimizer.hint' | head -120Repository: pingcap/docs-cn Length of output: 8879 🤖 get_repo_knowledge executed:
Length of output: 365 🌐 Web query:
💡 Result: <search_synthesis> <source_evidence> Citations:
🏁 Script executed: printf '%s\n' '--- local metadata references ---'
rg -n -C 8 'tidb_paging_size_bytes|TiDBPagingSizeBytes' variables.json system-variable-reference.md information-schema-variables-info.md information-schema-session-variables.md 2>/dev/null || true
printf '%s\n' '--- local documentation history summary ---'
git log -5 --oneline -- system-variables.md variables.jsonRepository: pingcap/docs-cn Length of output: 566 🌐 Web query:
💡 Result: <search_synthesis> <source_evidence> Citations:
🏁 Script executed: for c in 0a4e26f 684e35b 201b47f 7e6027e; do
echo "--- $c ---"
git show --format='%H%n%P%n%s' --stat "$c" -- system-variables.md
git show --format= --unified=8 "$c" -- system-variables.md | sed -n '1,180p'
doneRepository: pingcap/docs-cn Length of output: 6808 🌐 Web query:
💡 Result: <search_synthesis> <source_evidence> Citations:
🏁 Script executed: git show --format='%H%n%P%n%ad%n%s' --date=iso-strict 7e6027e
git show --format= --unified=20 7e6027e -- system-variables.md
printf '\n--- prior entry ---\n'
git show 7e6027e^:system-variables.md | sed -n '4740,4765p'Repository: pingcap/docs-cn Length of output: 5823 保留 TiDB 的 🤖 Prompt for AI Agents |
||
| - 执行 `SET GLOBAL tidb_paging_size_bytes = 0` 或 `SET GLOBAL tidb_paging_size_bytes = DEFAULT` 可关闭按字节数分页,生效时机与其他全局值更新相同。 | ||
| - 该变量为 TiDB 内部变量,**不推荐**修改该变量的值。 | ||
|
|
||
| ### `tidb_partition_prune_mode` <span class="version-mark">从 v5.1 版本开始引入</span> | ||
|
|
||
| > **警告:** | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.