TiDB KV Mapping

Data

1
2
Key: tablePrefix_rowPrefix_tableID_rowID
Value: [col1, col2, col3, col4]

Unique Index

1
2
Key: tablePrefix_idxPrefix_tableID_indexID_indexColumnsValue
Value: rowID

Non-Unique Index

1
2
Key: tablePrefix_idxPrefix_tableID_indexID_ColumnsValue_rowID
Value: nil

1
2
3
4
5
var (
tablePrefix = []byte{'t'}
recordPrefixSep = []byte("_r")
indexPrefixSep = []byte("_i")
)
Share Comments