Is the "import into" feature in version 7.5 considered a physical import or a logical import?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 7.5的import into算物理导入还是逻辑导入

| username: tidb狂热爱好者

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the problem occurred
[Encountered Problem: Problem Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

  • The recently released 7.5 LTS has officially GA’d a feature called IMPORT INTO (IMPORT INTO | PingCAP 文档中心). This feature integrates the physical import capability of tidb-lightning into TiDB compute nodes, allowing large-scale data imports to be completed with a single SQL statement, significantly simplifying the complexity of writing ultra-large-scale data.
| username: TiDBer_5cwU0ltE | Original post link

Borrowing your post, I will also do some research.

| username: WalterWj | Original post link

According to the description, it should be the same as Lightning: parse the CSV file >> generate SST files >> import SST files into TiKV. It is considered as Lightning local mode import, which is more inclined to “physical import.”

| username: vincentLi | Original post link

The original text explains: “IMPORT INTO statement uses TiDB Lightning’s physical import mode to import data in CSV, SQL, PARQUET, and other formats into an empty table in TiDB.”

There are too many side effects, so it is recommended to use it cautiously in a production environment.

| username: Kongdom | Original post link

It should be a physical import.

| username: 这里介绍不了我 | Original post link

Taking advantage of this, please take some time to study it.

| username: changpeng75 | Original post link

Directly generating SST files and persisting them to TiKV, instead of generating SQL statements for execution, is physical import.

| username: YuchongXU | Original post link

Physical import

| username: 霸王龙的日常 | Original post link

Physical import

| username: DBAER | Original post link

I don’t see any advantages.

| username: 小龙虾爱大龙虾 | Original post link

Didn’t the documentation mention physical import? :joy_cat:

| username: 像风一样的男子 | Original post link

It is a physical import mode that allows data to be inserted directly into TiKV nodes in the form of key-value pairs, bypassing the SQL interface.

| username: 像风一样的男子 | Original post link

According to the official documentation, it is possible to insert KV directly without going through the SQL interface, which will definitely greatly improve efficiency.

| username: opkcloud | Original post link

Physical import

| username: 小于同学 | Original post link

It should still be physical import.

| username: TiDBer_小阿飞 | Original post link

Since it’s on the TiDB server node, it’s clearly a logical import because it doesn’t directly import KV key-value pair data.
The backend mode corresponding to the physical import mode is “local”.
The backend mode corresponding to the logical import mode is “tidb”.