Open zz-jason opened 4 years ago
@eurekaka PTAL
have we compared the performance of KV scan and Cop Table scan?
maybe we can use KV scan directly?
@siddontang KVRangeScan
in the example is actually implemented by calling KV scan directly. It's just clarification to users by naming it to KVRangeScan
, since we are going to rename TableScan
to TableFullScan
, TableRangeScan
and TableScanByRowID
.
We can reuse the BatchPointGet
plan / executor node, and the logic of converting small range to point sets introduced in https://github.com/pingcap/tidb/pull/11524 ?
Oh, KVRangeScan
is supposed to have better performance than BatchPointGet
.
Feature Request
Is your feature request related to a problem? Please describe:
consider this case:
The following query can use
PointGet
to speed up:while the following query can not:
Describe the feature you'd like:
Directly calling KV Scan with ranges may help to speed the above query, the execution plan may look like:
Describe alternatives you've considered:
For discrete values like
int
, we can convert range queries toin()
. take the above query as an example, the equivalent query is:Then this query can benefit from
BatchPoint
in this case.Teachability, Documentation, Adoption, Migration Strategy:
No