Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions tidb-lightning/tidb-lightning-logical-import-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The logical import mode is one of the two import modes supported by TiDB Lightni

If your TiDB cluster already contains data and provides service for external applications, it is recommended to import data in the logical import mode. The behavior of the logical import mode is the same as executing normal SQL statements, and thus it guarantees ACID compliance.

The backend for the logical import mode is `tidb`.

## Environment requirements

**Operating system**:
Expand Down
5 changes: 3 additions & 2 deletions tidb-lightning/tidb-lightning-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ TiDB Lightning can read data from the following sources:

TiDB Lightning supports two import modes, configured by `backend`. The import mode determines the way data is imported into TiDB.

- [Physical Import Mode](/tidb-lightning/tidb-lightning-physical-import-mode.md): TiDB Lightning first encodes data into key-value pairs and stores them in a local temporary directory, then uploads these key-value pairs to each TiKV node, and finally calls the TiKV Ingest interface to insert data into TiKV's RocksDB. If you need to perform initial import, consider the physical import mode, which has higher import speed.
- [Physical Import Mode](/tidb-lightning/tidb-lightning-physical-import-mode.md): TiDB Lightning first encodes data into key-value pairs and stores them in a local temporary directory, then uploads these key-value pairs to each TiKV node, and finally calls the TiKV Ingest interface to insert data into TiKV's RocksDB. If you need to perform initial import, consider the physical import mode, which has higher import speed. The backend for the physical import mode is `local`.

- [Logical Import Mode](/tidb-lightning/tidb-lightning-logical-import-mode.md): TiDB Lightning first encodes the data into SQL statements and then runs these SQL statements directly for data import. If the cluster to be imported is in production, or if the target table to be imported already contains data, use the logical import mode.
- [Logical Import Mode](/tidb-lightning/tidb-lightning-logical-import-mode.md): TiDB Lightning first encodes the data into SQL statements and then runs these SQL statements directly for data import. If the cluster to be imported is in production, or if the target table to be imported already contains data, use the logical import mode. The backend for the logical import mode is `tidb`.

| Import mode | Physical Import Mode | Logical Import Mode |
|:---|:---|:---|
| Backend | `local` | `tidb` |
| Speed | Fast (100~500 GiB/hour) | Low (10~50 GiB/hour)|
| Resource consumption| High | Low |
| Network bandwidth consumption | High | Low |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ summary: Learn how to use the physical import mode in TiDB Lightning.

# Use Physical Import Mode

This document introduces how to use the physical import mode in TiDB Lightning, including writing the configuration file, tuning performance, and configuring disk quota.
This document introduces how to use the [physical import mode](/tidb-lightning/tidb-lightning-physical-import-mode.md) in TiDB Lightning, including writing the configuration file, tuning performance, and configuring disk quota.

## Configure and use the physical import mode

Expand Down
2 changes: 2 additions & 0 deletions tidb-lightning/tidb-lightning-physical-import-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Physical import mode is an efficient and fast import mode that inserts data dire

Before you use the physical import mode, make sure to read [Requirements and restrictions](#requirements-and-restrictions).

The backend for the physical import mode is `local`.

## Implementation

1. Before importing data, TiDB Lightning automatically switches the TiKV nodes to "import mode", which improves write performance and stops auto-compaction. TiDB Lightning determines whether to pause global scheduling according to the TiDB cluster version.
Expand Down