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: 1 addition & 1 deletion tidb-computing.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TiDB supports both primary keys and secondary indexes (both unique and non-uniqu
For primary keys and unique indexes, it is needed to quickly locate the corresponding `RowID` based on the key-value pair, so such a key-value pair is encoded as follows.

```
Key: tablePrefix{tableID}_indexPrefixSep{indexID}_indexedColumnsValue
Key: tablePrefix{TableID}_indexPrefixSep{IndexID}_indexedColumnsValue
Value: RowID
```

Expand Down
8 changes: 4 additions & 4 deletions troubleshoot-hot-spot-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TiDB assigns a TableID to each table, an IndexID to each index, and a RowID to e
Each row of data is encoded as a key-value pair according to the following rule:

```
Key: tablePrefix{tableID}_recordPrefixSep{rowID}
Key: tablePrefix{TableID}_recordPrefixSep{RowID}
Value: [col1, col2, col3, col4]
```

Expand All @@ -31,17 +31,17 @@ The `tablePrefix` and `recordPrefixSep` of the key are specific string constants
For Index data, the key-value pair is encoded according to the following rule:

```
Key: tablePrefix{tableID}_indexPrefixSep{indexID}_indexedColumnsValue
Key: tablePrefix{TableID}_indexPrefixSep{IndexID}_indexedColumnsValue
Value: rowID
```

Index data has two types: the unique index and the non-unique index.

- For unique indexes, you can follow the coding rules above.
- For non-unique indexes, a unique key cannot be constructed through this encoding, because the `tablePrefix{tableID}_indexPrefixSep{indexID}` of the same index is the same and the `ColumnsValue` of multiple rows might be the same. The encoding rule for non-unique indexes is as follows:
- For non-unique indexes, a unique key cannot be constructed through this encoding, because the `tablePrefix{TableID}_indexPrefixSep{IndexID}` of the same index is the same and the `ColumnsValue` of multiple rows might be the same. The encoding rule for non-unique indexes is as follows:

```
Key: tablePrefix{tableID}_indexPrefixSep{indexID}_indexedColumnsValue_rowID
Key: tablePrefix{TableID}_indexPrefixSep{IndexID}_indexedColumnsValue_rowID
Value: null
```

Expand Down
2 changes: 1 addition & 1 deletion troubleshoot-write-conflicts.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ You can use `tableID` to find the name of the related table:
{{< copyable "" >}}

```shell
curl http://{TiDBIP}:10080/db-table/{tableID}
curl http://{TiDBIP}:10080/db-table/{TableID}
```

You can use `indexID` and the table name to find the name of the related index:
Expand Down