Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve usage of IMPORT FROM SELECT #19261

Merged
merged 5 commits into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sql-statements/sql-statement-import-into.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ summary: TiDB 数据库中 IMPORT INTO 的使用概况。
- `IMPORT INTO ... FROM SELECT` 不支持使用 `SHOW IMPORT JOB(s)` 和 `CANCEL IMPORT JOB <job-id>` 等任务管理语句。
- TiDB [临时目录](/tidb-configuration-file.md#temp-dir-从-v630-版本开始引入)需要有足够的空间来存储整个 `SELECT` 语句查询结果(暂不支持设置 `DISK_QUOTA` 选项)。
- 不支持使用 [`tidb_snapshot`](/read-historical-data.md) 导入历史数据。
- 由于 `SELECT` 子句的语法较为复杂,`IMPORT INTO` 的 `WITH` 参数可能会与其冲突,导致解析时报错,例如 `GROUP BY ... [WITH ROLLUP]`。建议先对复杂的 `SELECT` 语句创建视图,然后使用 `IMPORT INTO ... FROM SELECT * FROM view_name` 进行导入。或者,可以通过括号明确 `SELECT` 子句的范围,例如 `IMPORT INTO ... FROM (SELECT ...) WITH ...`。

## 导入前准备

Expand Down
Loading