From 8a66c112eb5cb02a78d6d2a082c250b080940fe1 Mon Sep 17 00:00:00 2001 From: AilinKid <314806019@qq.com> Date: Mon, 31 Mar 2025 17:32:52 +0800 Subject: [PATCH 1/8] . Signed-off-by: AilinKid <314806019@qq.com> --- system-variables.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/system-variables.md b/system-variables.md index 15cfe1b9be5de..8890fa2e10bfb 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5253,6 +5253,13 @@ SHOW WARNINGS; - Possible values: `IN` - Controls the type of predicate used by the generated Filter operator. Currently, only one type is supported: `IN`. For more information, see [Runtime Filter type](/runtime-filter.md#runtime-filter-type). +### tidb_enable_point_get_cache +- Scope: SESSION +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): YES +- Type: Boolean +- Default value: `OFF` +- This variable can benefit the performance when table lock is enabled for type of "READ" and "READ ONLY" with this variable set to `ON`. + ### tidb_scatter_region > **Note:** From b1fd0254c85133273c178e0bfcfa7fb9c0ecd04a Mon Sep 17 00:00:00 2001 From: AilinKid <314806019@qq.com> Date: Mon, 31 Mar 2025 17:42:51 +0800 Subject: [PATCH 2/8] . Signed-off-by: AilinKid <314806019@qq.com> --- system-variables.md | 1 + 1 file changed, 1 insertion(+) diff --git a/system-variables.md b/system-variables.md index 8890fa2e10bfb..767eae67afc56 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5254,6 +5254,7 @@ SHOW WARNINGS; - Controls the type of predicate used by the generated Filter operator. Currently, only one type is supported: `IN`. For more information, see [Runtime Filter type](/runtime-filter.md#runtime-filter-type). ### tidb_enable_point_get_cache + - Scope: SESSION - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): YES - Type: Boolean From c6d46f6032ad84ce9f24bdf429035a4f5aa67229 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Tue, 8 Apr 2025 16:40:11 +0800 Subject: [PATCH 3/8] 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 767eae67afc56..88307c352fe4c 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5259,7 +5259,7 @@ SHOW WARNINGS; - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): YES - Type: Boolean - Default value: `OFF` -- This variable can benefit the performance when table lock is enabled for type of "READ" and "READ ONLY" with this variable set to `ON`. +- When the table lock type is set to `READ` or `READ ONLY`, enabling this variable (set it to `ON`) can improve the performance of point queries. ### tidb_scatter_region From e5c388806ad9e1a0d0bc7081dbde93a29eafae20 Mon Sep 17 00:00:00 2001 From: Arenatlx Date: Tue, 8 Apr 2025 16:46:49 +0800 Subject: [PATCH 4/8] Update system-variables.md Co-authored-by: github-actions[bot] <41898282+github-actions[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 88307c352fe4c..695ad85bf0c14 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5259,7 +5259,7 @@ SHOW WARNINGS; - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): YES - Type: Boolean - Default value: `OFF` -- When the table lock type is set to `READ` or `READ ONLY`, enabling this variable (set it to `ON`) can improve the performance of point queries. +- When the table lock type is set to `READ` or `READ ONLY`, setting this variable to `ON` can enhance the performance of point queries by enabling point get plan cache. ### tidb_scatter_region From f793b0b4033520cf66a4805f8affc185eb7ff0ef Mon Sep 17 00:00:00 2001 From: Arenatlx Date: Tue, 8 Apr 2025 16:50:05 +0800 Subject: [PATCH 5/8] Update system-variables.md Co-authored-by: xixirangrang --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 695ad85bf0c14..7cb3b82b61a05 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5259,7 +5259,7 @@ SHOW WARNINGS; - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): YES - Type: Boolean - Default value: `OFF` -- When the table lock type is set to `READ` or `READ ONLY`, setting this variable to `ON` can enhance the performance of point queries by enabling point get plan cache. +- When the table lock type is set to `READ` or `READ ONLY`, setting this variable to `ON` enables caching of point query results, reducing the overhead of repeated queries and improving point query performance. ### tidb_scatter_region From 53eeaccf647f9519362c84e782b2fe5c07fbd10f Mon Sep 17 00:00:00 2001 From: Arenatlx Date: Tue, 8 Apr 2025 17:12:59 +0800 Subject: [PATCH 6/8] Update system-variables.md Co-authored-by: xixirangrang --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 7cb3b82b61a05..d4431d0f6f842 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5259,7 +5259,7 @@ SHOW WARNINGS; - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): YES - Type: Boolean - Default value: `OFF` -- When the table lock type is set to `READ` or `READ ONLY`, setting this variable to `ON` enables caching of point query results, reducing the overhead of repeated queries and improving point query performance. +- When the table lock type of [`LOCK TABLES`](/sql-statements/sql-statement-lock-tables-and-unlock-tables.md) is set to `READ`, setting this variable to `ON` enables caching of point query results, reducing the overhead of repeated queries and improving point query performance. ### tidb_scatter_region From 5f2f2e9cda98b1a2e307ea997ce4b478f106d1bb Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Tue, 8 Apr 2025 17:24:43 +0800 Subject: [PATCH 7/8] Update system-variables.md --- system-variables.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/system-variables.md b/system-variables.md index d4431d0f6f842..cf3b204d74723 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2578,6 +2578,14 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; +### tidb_enable_point_get_cache + +- Scope: SESSION +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): YES +- Type: Boolean +- Default value: `OFF` +- When the table lock type of [`LOCK TABLES`](/sql-statements/sql-statement-lock-tables-and-unlock-tables.md) is set to `READ`, setting this variable to `ON` enables caching of point query results, reducing the overhead of repeated queries and improving point query performance. + ### tidb_enable_prepared_plan_cache New in v6.1.0 - Scope: SESSION | GLOBAL @@ -5253,14 +5261,6 @@ SHOW WARNINGS; - Possible values: `IN` - Controls the type of predicate used by the generated Filter operator. Currently, only one type is supported: `IN`. For more information, see [Runtime Filter type](/runtime-filter.md#runtime-filter-type). -### tidb_enable_point_get_cache - -- Scope: SESSION -- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): YES -- Type: Boolean -- Default value: `OFF` -- When the table lock type of [`LOCK TABLES`](/sql-statements/sql-statement-lock-tables-and-unlock-tables.md) is set to `READ`, setting this variable to `ON` enables caching of point query results, reducing the overhead of repeated queries and improving point query performance. - ### tidb_scatter_region > **Note:** From ffee9544a477091485fa3e035c26b01fda177cdf Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Tue, 8 Apr 2025 17:28:46 +0800 Subject: [PATCH 8/8] 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 cf3b204d74723..c8074a10acd5f 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2584,7 +2584,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): YES - Type: Boolean - Default value: `OFF` -- When the table lock type of [`LOCK TABLES`](/sql-statements/sql-statement-lock-tables-and-unlock-tables.md) is set to `READ`, setting this variable to `ON` enables caching of point query results, reducing the overhead of repeated queries and improving point query performance. +- When you set the table lock type of [`LOCK TABLES`](/sql-statements/sql-statement-lock-tables-and-unlock-tables.md) to `READ`, setting this variable to `ON` enables caching of point query results, reducing the overhead of repeated queries and improving point query performance. ### tidb_enable_prepared_plan_cache New in v6.1.0