diff --git a/dev/faq/tidb.md b/dev/faq/tidb.md index 836ce3c2f64df..6b770cb07630d 100644 --- a/dev/faq/tidb.md +++ b/dev/faq/tidb.md @@ -940,11 +940,7 @@ There are [similar limits](https://cloud.google.com/spanner/docs/limits) on Goog #### How to import data in batches? -1. When you import data, insert in batches and keep the number of rows within 10,000 for each batch. - -2. As for `insert` and `select`, you can open the hidden parameter `set @@session.tidb_batch_insert=1;`, and `insert` will execute large transactions in batches. In this way, you can avoid the timeout caused by large transactions, but this may lead to the loss of atomicity. Therefore, it is not recommended to use this parameter in the production environment. An error in the process of execution leads to partly inserted transaction. Therefore, use this parameter only when necessary, and use it in session to avoid affecting other statements. When the transaction is finished, use `set @@session.tidb_batch_insert=0` to close it. - -3. As for `delete` and `update`, you can use `limit` plus circulation to operate. +When you import data, insert in batches and keep the number of rows within 10,000 for each batch. #### Does TiDB release space immediately after deleting data? diff --git a/dev/reference/configuration/tidb-server/tidb-specific-variables.md b/dev/reference/configuration/tidb-server/tidb-specific-variables.md index 07f6ccdeeaf32..169f1a5881c2a 100644 --- a/dev/reference/configuration/tidb-server/tidb-specific-variables.md +++ b/dev/reference/configuration/tidb-server/tidb-specific-variables.md @@ -166,27 +166,6 @@ set @@global.tidb_distsql_scan_concurrency = 10 - This variable is used to set whether to skip UTF-8 validation. - Validating UTF-8 characters affects the performance. When you are sure that the input characters are valid UTF-8 characters, you can set the variable value to 1. -### tidb_batch_insert - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the inserted data automatically. It is valid only when `autocommit` is enabled. -- When inserting a large amount of data, you can set the variable value to `1`. Then, the inserted data is automatically divided into multiple batches and each batch is inserted by a single transaction. This operation breaks the atomicity and isolation of the transaction. When performing this operation, you must ensure that there are **no other** ongoing operations on the table. When an error occurs, **manual intervention is required to check the consistency and integrity of the data**. Therefore, it is not recommended to set this variable in a production environment. - -### tidb_batch_delete - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the data for deletion automatically. It is valid only when you delete from a single table and `autocommit` is enabled. For the definition of single-table DELETE statement, see [DELETE Syntax](https://dev.mysql.com/doc/refman/8.0/en/delete.html). -- When deleting a large amount of data, you can set the variable value to `1`. Then, the data for deletion is automatically divided into multiple batches and each batch is deleted by a single transaction. This operation breaks the atomicity and isolation of the transaction. When performing this operation, you must ensure that there are **no other** ongoing operations on the table. When an error occurs, **manual intervention is required to check the consistency and integrity of the data**. Therefore, it is not recommended to set this variable in a production environment. - -### tidb_dml_batch_size - -- Scope: SESSION -- Default value: 20000 -- This variable is used to set the automatically divided batch size of the data for insertion/deletion. It is only valid when `tidb_batch_insert` or `tidb_batch_delete` is enabled. -- When the data size of a single row is very large, the overall data size of 20 thousand rows exceeds the size limit for a single transaction. In this case, set the variable to a smaller value. - ### tidb_init_chunk_size - Scope: SESSION | GLOBAL diff --git a/v1.0/FAQ.md b/v1.0/FAQ.md index c35adfb641705..ca6199ab5574d 100755 --- a/v1.0/FAQ.md +++ b/v1.0/FAQ.md @@ -656,11 +656,7 @@ There are [similar limits](https://cloud.google.com/spanner/docs/limits) on Goog #### How to import data in batches? -1. When you import data, insert in batches and keep the number of rows within 10,000 for each batch. - -2. As for `insert` and `select`, you can open the hidden parameter `set @@session.tidb_batch_insert=1;`, and `insert` will execute large transactions in batches. In this way, you can avoid the timeout caused by large transactions, but this may lead to the loss of atomicity. An error in the process of execution leads to partly inserted transaction. Therefore, use this parameter only when necessary, and use it in session to avoid affecting other statements. When the transaction is finished, use `set @@session.tidb_batch_insert=0` to close it. - -3. As for `delete` and `update`, you can use `limit` plus circulation to operate. +When you import data, insert in batches and keep the number of rows within 10,000 for each batch. #### Does TiDB release space immediately after deleting data? diff --git a/v2.0/FAQ.md b/v2.0/FAQ.md index fb238e523afdb..12c0aea9ef6ce 100755 --- a/v2.0/FAQ.md +++ b/v2.0/FAQ.md @@ -858,11 +858,7 @@ There are [similar limits](https://cloud.google.com/spanner/docs/limits) on Goog #### How to import data in batches? -1. When you import data, insert in batches and keep the number of rows within 10,000 for each batch. - -2. As for `insert` and `select`, you can open the hidden parameter `set @@session.tidb_batch_insert=1;`, and `insert` will execute large transactions in batches. In this way, you can avoid the timeout caused by large transactions, but this may lead to the loss of atomicity. An error in the process of execution leads to partly inserted transaction. Therefore, use this parameter only when necessary, and use it in session to avoid affecting other statements. When the transaction is finished, use `set @@session.tidb_batch_insert=0` to close it. - -3. As for `delete` and `update`, you can use `limit` plus circulation to operate. +When you import data, insert in batches and keep the number of rows within 10,000 for each batch. #### Does TiDB release space immediately after deleting data? diff --git a/v2.1-legacy/FAQ.md b/v2.1-legacy/FAQ.md index 8cc0c8e5f9afb..3b181cb0e09c5 100755 --- a/v2.1-legacy/FAQ.md +++ b/v2.1-legacy/FAQ.md @@ -851,11 +851,7 @@ There are [similar limits](https://cloud.google.com/spanner/docs/limits) on Goog #### How to import data in batches? -1. When you import data, insert in batches and keep the number of rows within 10,000 for each batch. - -2. As for `insert` and `select`, you can open the hidden parameter `set @@session.tidb_batch_insert=1;`, and `insert` will execute large transactions in batches. In this way, you can avoid the timeout caused by large transactions, but this may lead to the loss of atomicity. An error in the process of execution leads to partly inserted transaction. Therefore, use this parameter only when necessary, and use it in session to avoid affecting other statements. When the transaction is finished, use `set @@session.tidb_batch_insert=0` to close it. - -3. As for `delete` and `update`, you can use `limit` plus circulation to operate. +When you import data, insert in batches and keep the number of rows within 10,000 for each batch. #### Does TiDB release space immediately after deleting data? diff --git a/v2.1-legacy/sql/tidb-specific.md b/v2.1-legacy/sql/tidb-specific.md index 49879dc0d869e..d7368975bc4ea 100755 --- a/v2.1-legacy/sql/tidb-specific.md +++ b/v2.1-legacy/sql/tidb-specific.md @@ -150,27 +150,6 @@ set @@global.tidb_distsql_scan_concurrency = 10 - This variable is used to set whether to skip UTF-8 validation. - Validating UTF-8 characters affects the performance. When you are sure that the input characters are valid UTF-8 characters, you can set the variable value to 1. -### tidb_batch_insert - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the inserted data automatically. It is valid only when `autocommit` is enabled. -- When inserting a large amount of data, you can set the variable value to true. Then the inserted data is automatically divided into multiple batches and each batch is inserted by a single transaction. - -### tidb_batch_delete - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the data for deletion automatically. It is valid only when `autocommit` is enabled. -- When deleting a large amount of data, you can set the variable value to true. Then the data for deletion is automatically divided into multiple batches and each batch is deleted by a single transaction. - -### tidb_dml_batch_size - -- Scope: SESSION -- Default value: 20000 -- This variable is used to set the automatically divided batch size of the data for insertion/deletion. It is only valid when `tidb_batch_insert` or `tidb_batch_delete` is enabled. -- When the data size of a single row is very large, the overall data size of 20 thousand rows exceeds the size limit for a single transaction. In this case, set the variable to a smaller value. - ### tidb_max_chunk_size - Scope: SESSION | GLOBAL diff --git a/v2.1/faq/tidb.md b/v2.1/faq/tidb.md index c29daada17c80..e785907d039d0 100644 --- a/v2.1/faq/tidb.md +++ b/v2.1/faq/tidb.md @@ -943,11 +943,7 @@ There are [similar limits](https://cloud.google.com/spanner/docs/limits) on Goog #### How to import data in batches? -1. When you import data, insert in batches and keep the number of rows within 10,000 for each batch. - -2. As for `insert` and `select`, you can open the hidden parameter `set @@session.tidb_batch_insert=1;`, and `insert` will execute large transactions in batches. In this way, you can avoid the timeout caused by large transactions, but this may lead to the loss of atomicity. Therefore, it is not recommended to use this parameter in the production environment. An error in the process of execution leads to partly inserted transaction. Therefore, use this parameter only when necessary, and use it in session to avoid affecting other statements. When the transaction is finished, use `set @@session.tidb_batch_insert=0` to close it. - -3. As for `delete` and `update`, you can use `limit` plus circulation to operate. +When you import data, insert in batches and keep the number of rows within 10,000 for each batch. #### Does TiDB release space immediately after deleting data? diff --git a/v2.1/reference/configuration/tidb-server/tidb-specific-variables.md b/v2.1/reference/configuration/tidb-server/tidb-specific-variables.md index cdbf752a18f47..a34e5b6a85013 100644 --- a/v2.1/reference/configuration/tidb-server/tidb-specific-variables.md +++ b/v2.1/reference/configuration/tidb-server/tidb-specific-variables.md @@ -150,27 +150,6 @@ set @@global.tidb_distsql_scan_concurrency = 10 - This variable is used to set whether to skip UTF-8 validation. - Validating UTF-8 characters affects the performance. When you are sure that the input characters are valid UTF-8 characters, you can set the variable value to 1. -### tidb_batch_insert - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the inserted data automatically. It is valid only when `autocommit` is enabled. -- When inserting a large amount of data, you can set the variable value to `1`. Then, the inserted data is automatically divided into multiple batches and each batch is inserted by a single transaction. This operation breaks the atomicity and isolation of the transaction. When performing this operation, you must ensure that there are **no other** ongoing operations on the table. When an error occurs, **manual intervention is required to check the consistency and integrity of the data**. Therefore, it is not recommended to set this variable in a production environment. - -### tidb_batch_delete - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the data for deletion automatically. It is valid only when you delete from a single table and `autocommit` is enabled. For the definition of single-table DELETE statement, see [DELETE Syntax](https://dev.mysql.com/doc/refman/8.0/en/delete.html). -- When deleting a large amount of data, you can set the variable value to `1`. Then, the data for deletion is automatically divided into multiple batches and each batch is deleted by a single transaction. This operation breaks the atomicity and isolation of the transaction. When performing this operation, you must ensure that there are **no other** ongoing operations on the table. When an error occurs, **manual intervention is required to check the consistency and integrity of the data**. Therefore, it is not recommended to set this variable in a production environment. - -### tidb_dml_batch_size - -- Scope: SESSION -- Default value: 20000 -- This variable is used to set the automatically divided batch size of the data for insertion/deletion. It is only valid when `tidb_batch_insert` or `tidb_batch_delete` is enabled. -- When the data size of a single row is very large, the overall data size of 20 thousand rows exceeds the size limit for a single transaction. In this case, set the variable to a smaller value. - ### tidb_max_chunk_size - Scope: SESSION | GLOBAL diff --git a/v3.0/faq/tidb.md b/v3.0/faq/tidb.md index 7fc7b80425a60..d683437258648 100644 --- a/v3.0/faq/tidb.md +++ b/v3.0/faq/tidb.md @@ -942,11 +942,7 @@ There are [similar limits](https://cloud.google.com/spanner/docs/limits) on Goog #### How to import data in batches? -1. When you import data, insert in batches and keep the number of rows within 10,000 for each batch. - -2. As for `insert` and `select`, you can open the hidden parameter `set @@session.tidb_batch_insert=1;`, and `insert` will execute large transactions in batches. In this way, you can avoid the timeout caused by large transactions, but this may lead to the loss of atomicity. Therefore, it is not recommended to use this parameter in the production environment. An error in the process of execution leads to partly inserted transaction. Therefore, use this parameter only when necessary, and use it in session to avoid affecting other statements. When the transaction is finished, use `set @@session.tidb_batch_insert=0` to close it. - -3. As for `delete` and `update`, you can use `limit` plus circulation to operate. +When you import data, insert in batches and keep the number of rows within 10,000 for each batch. #### Does TiDB release space immediately after deleting data? diff --git a/v3.0/reference/configuration/tidb-server/tidb-specific-variables.md b/v3.0/reference/configuration/tidb-server/tidb-specific-variables.md index 8328332f7ecc3..718792e7d5317 100644 --- a/v3.0/reference/configuration/tidb-server/tidb-specific-variables.md +++ b/v3.0/reference/configuration/tidb-server/tidb-specific-variables.md @@ -166,27 +166,6 @@ set @@global.tidb_distsql_scan_concurrency = 10 - This variable is used to set whether to skip UTF-8 validation. - Validating UTF-8 characters affects the performance. When you are sure that the input characters are valid UTF-8 characters, you can set the variable value to 1. -### tidb_batch_insert - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the inserted data automatically. It is valid only when `autocommit` is enabled. -- When inserting a large amount of data, you can set the variable value to `1`. Then, the inserted data is automatically divided into multiple batches and each batch is inserted by a single transaction. This operation breaks the atomicity and isolation of the transaction. When performing this operation, you must ensure that there are **no other** ongoing operations on the table. When an error occurs, **manual intervention is required to check the consistency and integrity of the data**. Therefore, it is not recommended to set this variable in a production environment. - -### tidb_batch_delete - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the data for deletion automatically. It is valid only when you delete from a single table and `autocommit` is enabled. For the definition of single-table DELETE statement, see [DELETE Syntax](https://dev.mysql.com/doc/refman/8.0/en/delete.html). -- When deleting a large amount of data, you can set the variable value to `1`. Then, the data for deletion is automatically divided into multiple batches and each batch is deleted by a single transaction. This operation breaks the atomicity and isolation of the transaction. When performing this operation, you must ensure that there are **no other** ongoing operations on the table. When an error occurs, **manual intervention is required to check the consistency and integrity of the data**. Therefore, it is not recommended to set this variable in a production environment. - -### tidb_dml_batch_size - -- Scope: SESSION -- Default value: 20000 -- This variable is used to set the automatically divided batch size of the data for insertion/deletion. It is only valid when `tidb_batch_insert` or `tidb_batch_delete` is enabled. -- When the data size of a single row is very large, the overall data size of 20 thousand rows exceeds the size limit for a single transaction. In this case, set the variable to a smaller value. - ### tidb_init_chunk_size - Scope: SESSION | GLOBAL diff --git a/v3.1/faq/tidb.md b/v3.1/faq/tidb.md index f62d6c63552a4..a3af6fa3fe811 100644 --- a/v3.1/faq/tidb.md +++ b/v3.1/faq/tidb.md @@ -941,11 +941,7 @@ There are [similar limits](https://cloud.google.com/spanner/docs/limits) on Goog #### How to import data in batches? -1. When you import data, insert in batches and keep the number of rows within 10,000 for each batch. - -2. As for `insert` and `select`, you can open the hidden parameter `set @@session.tidb_batch_insert=1;`, and `insert` will execute large transactions in batches. In this way, you can avoid the timeout caused by large transactions, but this may lead to the loss of atomicity. Therefore, it is not recommended to use this parameter in the production environment. An error in the process of execution leads to partly inserted transaction. Therefore, use this parameter only when necessary, and use it in session to avoid affecting other statements. When the transaction is finished, use `set @@session.tidb_batch_insert=0` to close it. - -3. As for `delete` and `update`, you can use `limit` plus circulation to operate. +When you import data, insert in batches and keep the number of rows within 10,000 for each batch. #### Does TiDB release space immediately after deleting data? diff --git a/v3.1/reference/configuration/tidb-server/tidb-specific-variables.md b/v3.1/reference/configuration/tidb-server/tidb-specific-variables.md index 6fa7f208798ac..8e4198a07b248 100644 --- a/v3.1/reference/configuration/tidb-server/tidb-specific-variables.md +++ b/v3.1/reference/configuration/tidb-server/tidb-specific-variables.md @@ -166,27 +166,6 @@ set @@global.tidb_distsql_scan_concurrency = 10 - This variable is used to set whether to skip UTF-8 validation. - Validating UTF-8 characters affects the performance. When you are sure that the input characters are valid UTF-8 characters, you can set the variable value to 1. -### tidb_batch_insert - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the inserted data automatically. It is valid only when `autocommit` is enabled. -- When inserting a large amount of data, you can set the variable value to `1`. Then, the inserted data is automatically divided into multiple batches and each batch is inserted by a single transaction. This operation breaks the atomicity and isolation of the transaction. When performing this operation, you must ensure that there are **no other** ongoing operations on the table. When an error occurs, **manual intervention is required to check the consistency and integrity of the data**. Therefore, it is not recommended to set this variable in a production environment. - -### tidb_batch_delete - -- Scope: SESSION -- Default value: 0 -- This variable is used to set whether to divide the data for deletion automatically. It is valid only when you delete from a single table and `autocommit` is enabled. For the definition of single-table DELETE statement, see [DELETE Syntax](https://dev.mysql.com/doc/refman/8.0/en/delete.html). -- When deleting a large amount of data, you can set the variable value to `1`. Then, the data for deletion is automatically divided into multiple batches and each batch is deleted by a single transaction. This operation breaks the atomicity and isolation of the transaction. When performing this operation, you must ensure that there are **no other** ongoing operations on the table. When an error occurs, **manual intervention is required to check the consistency and integrity of the data**. Therefore, it is not recommended to set this variable in a production environment. - -### tidb_dml_batch_size - -- Scope: SESSION -- Default value: 20000 -- This variable is used to set the automatically divided batch size of the data for insertion/deletion. It is only valid when `tidb_batch_insert` or `tidb_batch_delete` is enabled. -- When the data size of a single row is very large, the overall data size of 20 thousand rows exceeds the size limit for a single transaction. In this case, set the variable to a smaller value. - ### tidb_init_chunk_size - Scope: SESSION | GLOBAL