From a3645ed31a5557b15f1b3c915c5f45f18bdd9d6e Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 31 Aug 2026 16:31:08 +0800 Subject: [PATCH 1/7] system-variables: add tidb_paging_size_bytes (internal use) (#23565) --- system-variables.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/system-variables.md b/system-variables.md index c738522eb18b2..83a0921138480 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5402,6 +5402,24 @@ SHOW WARNINGS; - Range: `[0, 2147483647]` - This variable controls the iteration of the optimizer's estimation logic. After changing the value of this variable, the estimation logic of the optimizer will change greatly. Currently, `0` is the only valid value. It is not recommended to set it to other values. +### `tidb_paging_size_bytes` New in v9.0.0 and TiDB-X-CLOUD.202603 + +>**Note:** +> +> This variable is not supported on TiDB Cloud Starter. + +- Scope + - TiDB Self-Managed: SESSION | GLOBAL + - TiDB Cloud Essential and Premium: SESSION +- Persists to cluster: Yes +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes +- Type: Integer +- Default value: `0` +- Range: `[0, 9223372036854775807]` +- Unit: bytes +- Controls the maximum size, in bytes, of a single paged response in the coprocessor protocol, providing an additional response-size-based pagination mechanism alongside the row-based pagination controlled by [`tidb_max_paging_size`](#tidb_max_paging_size-new-in-v630). The default value of this variable is `0`, which disables byte-based pagination. This feature takes effect only when [resource control](/tidb-resource-control-ru-groups.md) is enabled, and the resource group of the current statement has a fixed RU quota. It allows the PD resource control module to estimate RU consumption based on the amount of data to be scanned and deduct the estimated RUs in advance before the statement is executed. To enable this feature, consider setting the variable to `4194304` (4 MiB). +- This variable is an internal TiDB variable. It is **not recommended** to modify its value. + ### tidb_partition_prune_mode New in v5.1 > **Warning:** From 2b3943cfe62362f2b5160cf904f03c8f61d3594d Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 3 Sep 2026 15:22:36 +0800 Subject: [PATCH 2/7] Update system-variables.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 83a0921138480..49cecc4793d59 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5404,7 +5404,7 @@ SHOW WARNINGS; ### `tidb_paging_size_bytes` New in v9.0.0 and TiDB-X-CLOUD.202603 ->**Note:** +> **Note:** > > This variable is not supported on TiDB Cloud Starter. From b8ceec86baad839e3465e59ec249e29d9a891c3d Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 8 Sep 2026 11:34:15 +0800 Subject: [PATCH 3/7] Apply suggestions from code review --- system-variables.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/system-variables.md b/system-variables.md index 49cecc4793d59..70835a9c13839 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5406,18 +5406,16 @@ SHOW WARNINGS; > **Note:** > -> This variable is not supported on TiDB Cloud Starter. +> This variable is only available on TiDB Cloud Essential and Premium, whose kernel version is TiDB-X-CLOUD.202603 or later. -- Scope - - TiDB Self-Managed: SESSION | GLOBAL - - TiDB Cloud Essential and Premium: SESSION +- Scope: SESSION - Persists to cluster: Yes - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes - Type: Integer - Default value: `0` - Range: `[0, 9223372036854775807]` - Unit: bytes -- Controls the maximum size, in bytes, of a single paged response in the coprocessor protocol, providing an additional response-size-based pagination mechanism alongside the row-based pagination controlled by [`tidb_max_paging_size`](#tidb_max_paging_size-new-in-v630). The default value of this variable is `0`, which disables byte-based pagination. This feature takes effect only when [resource control](/tidb-resource-control-ru-groups.md) is enabled, and the resource group of the current statement has a fixed RU quota. It allows the PD resource control module to estimate RU consumption based on the amount of data to be scanned and deduct the estimated RUs in advance before the statement is executed. To enable this feature, consider setting the variable to `4194304` (4 MiB). +- Controls the maximum size, in bytes, of a single paged response in the coprocessor protocol, providing an additional response-size-based pagination mechanism alongside the row-based pagination controlled by [`tidb_max_paging_size`](#tidb_max_paging_size-new-in-v630). The default value of this variable is `0`, which disables byte-based pagination. To enable this feature, consider setting the variable to `4194304` (4 MiB). - This variable is an internal TiDB variable. It is **not recommended** to modify its value. ### tidb_partition_prune_mode New in v5.1 From 1f2d97da62c6ca8ce84f83e8610366c2a685bfbd Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 8 Sep 2026 11:34:25 +0800 Subject: [PATCH 4/7] Update system-variables.md --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 70835a9c13839..3a66f3323eabc 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5402,7 +5402,7 @@ SHOW WARNINGS; - Range: `[0, 2147483647]` - This variable controls the iteration of the optimizer's estimation logic. After changing the value of this variable, the estimation logic of the optimizer will change greatly. Currently, `0` is the only valid value. It is not recommended to set it to other values. -### `tidb_paging_size_bytes` New in v9.0.0 and TiDB-X-CLOUD.202603 +### `tidb_paging_size_bytes` New in TiDB-X-CLOUD.202603 > **Note:** > From 5c43295d9b810b93d14879d4da325193367eb9be Mon Sep 17 00:00:00 2001 From: qiancai Date: Tue, 8 Sep 2026 14:20:51 +0800 Subject: [PATCH 5/7] show tidb_paging_size_bytes only tidb-cloud --- system-variables.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system-variables.md b/system-variables.md index 3a66f3323eabc..1c58af3de7ca0 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5402,6 +5402,8 @@ SHOW WARNINGS; - Range: `[0, 2147483647]` - This variable controls the iteration of the optimizer's estimation logic. After changing the value of this variable, the estimation logic of the optimizer will change greatly. Currently, `0` is the only valid value. It is not recommended to set it to other values. + + ### `tidb_paging_size_bytes` New in TiDB-X-CLOUD.202603 > **Note:** @@ -5418,6 +5420,8 @@ SHOW WARNINGS; - Controls the maximum size, in bytes, of a single paged response in the coprocessor protocol, providing an additional response-size-based pagination mechanism alongside the row-based pagination controlled by [`tidb_max_paging_size`](#tidb_max_paging_size-new-in-v630). The default value of this variable is `0`, which disables byte-based pagination. To enable this feature, consider setting the variable to `4194304` (4 MiB). - This variable is an internal TiDB variable. It is **not recommended** to modify its value. + + ### tidb_partition_prune_mode New in v5.1 > **Warning:** From b2cb4affe60c30cae22fa2f24d544d413e31e3ab Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 9 Sep 2026 10:25:20 +0800 Subject: [PATCH 6/7] Update system-variables.md --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 1c58af3de7ca0..e3d5bbff84e8d 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5404,7 +5404,7 @@ SHOW WARNINGS; -### `tidb_paging_size_bytes` New in TiDB-X-CLOUD.202603 +### `tidb_paging_size_bytes` New in CLOUD.202603 > **Note:** > From 7289a13e926191054fe6e0a52ea64042d9b3d516 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 9 Sep 2026 10:27:56 +0800 Subject: [PATCH 7/7] Update system-variables.md --- system-variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-variables.md b/system-variables.md index e3d5bbff84e8d..bfec1f16ebe0c 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5404,11 +5404,11 @@ SHOW WARNINGS; -### `tidb_paging_size_bytes` New in CLOUD.202603 +### `tidb_paging_size_bytes` New in CLOUD.202603.1 > **Note:** > -> This variable is only available on TiDB Cloud Essential and Premium, whose kernel version is TiDB-X-CLOUD.202603 or later. +> This variable is only available on TiDB Cloud Essential and Premium, whose kernel version is TiDB-X-CLOUD.202603.1 or later. - Scope: SESSION - Persists to cluster: Yes