From cd06bf35bb37c850e225c3a4fd2de4c25acf3ed3 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 dee353d8fba2b..7f5bbbd751fb9 100644 --- a/sql-statements/sql-statement-import-into.md +++ b/sql-statements/sql-statement-import-into.md @@ -160,11 +160,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). @@ -211,6 +207,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 59f32942c76cc58214ea9315b9dfc383f12454a8 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 a475c665ac83d030807786798f0f821760dc9aaf 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 7f5bbbd751fb9..aa29a56795516 100644 --- a/sql-statements/sql-statement-import-into.md +++ b/sql-statements/sql-statement-import-into.md @@ -186,6 +186,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: @@ -207,7 +211,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 8cfb2cae2307509fcf4650cc5f77cb9cc6f5bb42 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.