From 44bf75a9e66432f5ae14de7d7180800188628b8d Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Fri, 8 Mar 2024 11:24:15 +0800 Subject: [PATCH 1/7] Update system-variables.md --- system-variables.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 01e26e42449c3..10c75fb64d96b 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3399,9 +3399,20 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Boolean - Default value: `OFF` -- This variable is used to set whether to enable the low precision TSO feature. After this feature is enabled, new transactions use a timestamp updated every 2 seconds to read data. +- This variable is used to set whether to enable the low precision TSO feature. After this feature is enabled, TiDB uses cached Timestamp to read data. The cached Timestamp is updated every 2 seconds by default. Starting from version v8.0.0, the update frequency can be configured by [`tidb_low_resolution_tso_update_interval`](#tidb_low_resolution_tso_update_interval-new-in-v800). - The main applicable scenario is to reduce the overhead of acquiring TSO for small read-only transactions when reading old data is acceptable. +### `tidb_low_resolution_tso_update_interval` New in v8.0.0 + +- Scope:GLOBAL +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value) 控制:否 +- Type:Integer +- Default value:`2000` +- Range:`[10, 60000]` +- Unit: Milliseconds +- This variable is used to set the update frequency of the cached Timestamp used in the low-precision TSO feature, in milliseconds. +- This variable is only available in the [`tidb_low_resolution_tso`](#tidb_low_resolution_tso) feature. + ### tidb_max_auto_analyze_time New in v6.1.0 - Scope: GLOBAL From bca67473b906900f6023f42a9da8603040854596 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Fri, 8 Mar 2024 15:31:37 +0800 Subject: [PATCH 2/7] Apply suggestions from code review --- system-variables.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system-variables.md b/system-variables.md index 10c75fb64d96b..e7f519ae6201b 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3399,19 +3399,19 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Boolean - Default value: `OFF` -- This variable is used to set whether to enable the low precision TSO feature. After this feature is enabled, TiDB uses cached Timestamp to read data. The cached Timestamp is updated every 2 seconds by default. Starting from version v8.0.0, the update frequency can be configured by [`tidb_low_resolution_tso_update_interval`](#tidb_low_resolution_tso_update_interval-new-in-v800). +- This variable is used to set whether to enable the low precision TSO feature. After this feature is enabled, TiDB uses the cached timestamp to read data. The cached timestamp is updated every 2 seconds by default. Starting from version v8.0.0, the update frequency can be configured by [`tidb_low_resolution_tso_update_interval`](#tidb_low_resolution_tso_update_interval-new-in-v800). - The main applicable scenario is to reduce the overhead of acquiring TSO for small read-only transactions when reading old data is acceptable. ### `tidb_low_resolution_tso_update_interval` New in v8.0.0 - Scope:GLOBAL -- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value) 控制:否 +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type:Integer - Default value:`2000` - Range:`[10, 60000]` - Unit: Milliseconds -- This variable is used to set the update frequency of the cached Timestamp used in the low-precision TSO feature, in milliseconds. -- This variable is only available in the [`tidb_low_resolution_tso`](#tidb_low_resolution_tso) feature. +- This variable is used to set the update frequency of the cached timestamp used in the low-precision TSO feature, in milliseconds. +- This variable is only available when [`tidb_low_resolution_tso`](#tidb_low_resolution_tso) is enabled. ### tidb_max_auto_analyze_time New in v6.1.0 From a3cb494975eb8293d07b5e3570290ae7678bf17f Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Tue, 12 Mar 2024 16:26:59 +0800 Subject: [PATCH 3/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 e7f519ae6201b..52ecdb34e1d8e 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3399,7 +3399,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Boolean - Default value: `OFF` -- This variable is used to set whether to enable the low precision TSO feature. After this feature is enabled, TiDB uses the cached timestamp to read data. The cached timestamp is updated every 2 seconds by default. Starting from version v8.0.0, the update frequency can be configured by [`tidb_low_resolution_tso_update_interval`](#tidb_low_resolution_tso_update_interval-new-in-v800). +- This variable is used to set whether to enable the low-precision TSO feature. After this feature is enabled, TiDB uses the cached timestamp to read data. The cached timestamp is updated every 2 seconds by default. Starting from v8.0.0, you can configure the update frequency by [`tidb_low_resolution_tso_update_interval`](#tidb_low_resolution_tso_update_interval-new-in-v800). - The main applicable scenario is to reduce the overhead of acquiring TSO for small read-only transactions when reading old data is acceptable. ### `tidb_low_resolution_tso_update_interval` New in v8.0.0 From ea7cd176ca1e082ee55006dfb109db5636f97ca6 Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Thu, 14 Mar 2024 14:34:23 +0800 Subject: [PATCH 4/7] Update system-variables.md Co-authored-by: xixirangrang --- system-variables.md | 1 + 1 file changed, 1 insertion(+) diff --git a/system-variables.md b/system-variables.md index 52ecdb34e1d8e..b8d15664c0534 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3396,6 +3396,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified ### tidb_low_resolution_tso - Scope: SESSION +- Persists to cluster: No - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Boolean - Default value: `OFF` From a548866fec764333d6e3ad83941b35fabdec13ec Mon Sep 17 00:00:00 2001 From: cfzjywxk Date: Thu, 14 Mar 2024 14:34:35 +0800 Subject: [PATCH 5/7] Update system-variables.md Co-authored-by: xixirangrang --- system-variables.md | 1 + 1 file changed, 1 insertion(+) diff --git a/system-variables.md b/system-variables.md index b8d15664c0534..e4cb1b548f5a8 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3406,6 +3406,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified ### `tidb_low_resolution_tso_update_interval` New in v8.0.0 - Scope:GLOBAL +- Persists to cluster: Yes - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type:Integer - Default value:`2000` From 8277b94f3630ab46f84e99e7664703f90b3cd66e Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 14 Mar 2024 16:24:16 +0800 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Aolin --- system-variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-variables.md b/system-variables.md index e4cb1b548f5a8..0739511e6865c 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3400,7 +3400,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Boolean - Default value: `OFF` -- This variable is used to set whether to enable the low-precision TSO feature. After this feature is enabled, TiDB uses the cached timestamp to read data. The cached timestamp is updated every 2 seconds by default. Starting from v8.0.0, you can configure the update frequency by [`tidb_low_resolution_tso_update_interval`](#tidb_low_resolution_tso_update_interval-new-in-v800). +- This variable is used to set whether to enable the low-precision TSO feature. After this feature is enabled, TiDB uses the cached timestamp to read data. The cached timestamp is updated every 2 seconds by default. Starting from v8.0.0, you can configure the update interval by [`tidb_low_resolution_tso_update_interval`](#tidb_low_resolution_tso_update_interval-new-in-v800). - The main applicable scenario is to reduce the overhead of acquiring TSO for small read-only transactions when reading old data is acceptable. ### `tidb_low_resolution_tso_update_interval` New in v8.0.0 @@ -3412,7 +3412,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Default value:`2000` - Range:`[10, 60000]` - Unit: Milliseconds -- This variable is used to set the update frequency of the cached timestamp used in the low-precision TSO feature, in milliseconds. +- This variable is used to set the update interval of the cached timestamp used in the low-precision TSO feature, in milliseconds. - This variable is only available when [`tidb_low_resolution_tso`](#tidb_low_resolution_tso) is enabled. ### tidb_max_auto_analyze_time New in v6.1.0 From 6c6cd3f4230eb515e82bd5c2ae82a5d88336a404 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 14 Mar 2024 17:29:37 +0800 Subject: [PATCH 7/7] Update system-variables.md --- system-variables.md | 1 - 1 file changed, 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 0739511e6865c..0982320ab73da 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3396,7 +3396,6 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified ### tidb_low_resolution_tso - Scope: SESSION -- Persists to cluster: No - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Boolean - Default value: `OFF`