From 8886289bfb33e369d63c86bbb4f3dd9b2c8bbe9f Mon Sep 17 00:00:00 2001 From: zeminzhou Date: Tue, 22 Apr 2025 16:01:25 +0800 Subject: [PATCH 1/4] serverless support import into Signed-off-by: zeminzhou --- sql-statements/sql-statement-import-into.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sql-statements/sql-statement-import-into.md b/sql-statements/sql-statement-import-into.md index d85270ca1e684..f17137a9616c9 100644 --- a/sql-statements/sql-statement-import-into.md +++ b/sql-statements/sql-statement-import-into.md @@ -159,11 +159,7 @@ The supported options are described as follows: ## `IMPORT INTO ... FROM FILE` usage -> **Note:** -> -> `IMPORT INTO ... FROM FILE` is not available on [TiDB Cloud Serverless](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-serverless) clusters. - -For TiDB Self-Managed, `IMPORT INTO ... FROM FILE` supports importing data from files stored in Amazon S3, GCS, and the TiDB local storage. For [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated), `IMPORT INTO ... FROM FILE` supports importing data from files stored in Amazon S3 and GCS. +For TiDB Self-Managed, `IMPORT INTO ... FROM FILE` supports importing data from files stored in Amazon S3, GCS, and the TiDB local storage. For [TiDB Cloud Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-dedicated), `IMPORT INTO ... FROM FILE` supports importing data from files stored in Amazon S3 and GCS. For [TiDB Cloud Serverless](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-serverless), `IMPORT INTO ... FROM FILE` supports importing data from files stored in Amazon S3 and Alibaba Cloud OSS. - For data files stored in Amazon S3 or GCS, `IMPORT INTO ... FROM FILE` supports running in the [TiDB Distributed eXecution Framework (DXF)](/tidb-distributed-execution-framework.md). @@ -210,6 +206,7 @@ SET GLOBAL tidb_server_memory_limit='75%'; > > - If the KV range overlap in a source data file is low, enabling Global Sort might decrease import performance. This is because when Global Sort is enabled, TiDB needs to wait for the completion of local sorting in all sub-jobs before proceeding with the Global Sort operations and subsequent import. > - After an import job using Global Sort completes, the files stored in the cloud storage for Global Sort are cleaned up asynchronously in a background thread. +> - Global Sort is not available on TiDB Cloud Serverless clusters. ### Output From c3d9e2a26327520937e17137a7a4927daa2eb583 Mon Sep 17 00:00:00 2001 From: zeminzhou Date: Tue, 22 Apr 2025 16:06:05 +0800 Subject: [PATCH 2/4] fix cancel import jobs Signed-off-by: zeminzhou --- sql-statements/sql-statement-cancel-import-job.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sql-statements/sql-statement-cancel-import-job.md b/sql-statements/sql-statement-cancel-import-job.md index 97a5e4a436ad2..d4b911d846384 100644 --- a/sql-statements/sql-statement-cancel-import-job.md +++ b/sql-statements/sql-statement-cancel-import-job.md @@ -7,10 +7,6 @@ summary: An overview of the usage of CANCEL IMPORT in TiDB. The `CANCEL IMPORT` statement is used to cancel a data import job created in TiDB. -> **Note:** -> -> This feature is not available on [TiDB Cloud Serverless](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-serverless) clusters. - ## Required privileges To cancel a data import job, you need to be the creator of the import job or have the `SUPER` privilege. From ccf4c3582d351e5d94c080ce3b683f5d9f81c21d Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 23 Apr 2025 15:49:30 +0800 Subject: [PATCH 3/4] move the global sort support note for serverless clusters --- sql-statements/sql-statement-import-into.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-import-into.md b/sql-statements/sql-statement-import-into.md index f17137a9616c9..1bb57618741ae 100644 --- a/sql-statements/sql-statement-import-into.md +++ b/sql-statements/sql-statement-import-into.md @@ -185,6 +185,10 @@ For TiDB Self-Managed, `IMPORT INTO ... FROM FILE` supports importing data from ### Global Sort +> **Note:** +> +> Global Sort is not available on [TiDB Cloud Serverless](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-serverless) clusters. + `IMPORT INTO ... FROM FILE` splits the data import job of a source data file into multiple sub-jobs, each sub-job independently encoding and sorting data before importing. If the encoded KV ranges of these sub-jobs have significant overlap (to learn how TiDB encodes data to KV, see [TiDB computing](/tidb-computing.md)), TiKV needs to keep compaction during import, leading to a decrease in import performance and stability. In the following scenarios, there can be significant overlap in KV ranges: @@ -206,7 +210,6 @@ SET GLOBAL tidb_server_memory_limit='75%'; > > - If the KV range overlap in a source data file is low, enabling Global Sort might decrease import performance. This is because when Global Sort is enabled, TiDB needs to wait for the completion of local sorting in all sub-jobs before proceeding with the Global Sort operations and subsequent import. > - After an import job using Global Sort completes, the files stored in the cloud storage for Global Sort are cleaned up asynchronously in a background thread. -> - Global Sort is not available on TiDB Cloud Serverless clusters. ### Output From d937f51b011c81b38dae6b34565d210f01f16ac5 Mon Sep 17 00:00:00 2001 From: zeminzhou Date: Wed, 23 Apr 2025 16:04:23 +0800 Subject: [PATCH 4/4] remove note Signed-off-by: zeminzhou --- sql-statements/sql-statement-show-import-job.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sql-statements/sql-statement-show-import-job.md b/sql-statements/sql-statement-show-import-job.md index 9100ea128cf34..396f60558a137 100644 --- a/sql-statements/sql-statement-show-import-job.md +++ b/sql-statements/sql-statement-show-import-job.md @@ -7,10 +7,6 @@ summary: An overview of the usage of SHOW IMPORT in TiDB. The `SHOW IMPORT` statement is used to show the IMPORT jobs created in TiDB. This statement can only show jobs created by the current user. -> **Note:** -> -> This feature is not available on [TiDB Cloud Serverless](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-cloud-serverless) clusters. - ## Required privileges - `SHOW IMPORT JOBS`: if a user has the `SUPER` privilege, this statement shows all import jobs in TiDB. Otherwise, this statement only shows jobs created by the current user.