pingcap/tidb

TiDB gets row data even using covered index

Open

#37.765 aperta il 13 set 2022

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Go (6186 fork)batch import
help wantedsig/transactiontype/enhancement

Metriche repository

Star
 (40.090 star)
Metriche merge PR
 (Merge medio 14g 4h) (346 PR mergiate in 30 g)

Descrizione

Enhancement

create table t1(id1 int, id2 int, id3 int, PRIMARY KEY(id1), UNIQUE KEY udx_id2 (id2));

SELECT id2 FROM t1 WHERE id2 = 1

The point-get statement above used covered index udx_id2 , but TiDB still needs to get the row data. In fact, we should remove this step.

Guida contributor