try use max uint64 as tso for table/index reader which only has 1 cop task and in autocommit txn
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
The point-get query can use max uint64 as tso when only has 1 rpc request.
Similarly, try to use max uint64 as tso for table/index reader which only has 1 cop task, and in autocommit transaction.
Here is an example:
```sql
create table t (id int key, b int, c int, index idx(b));
```
For the following query, only read a small range of data, and in most cases, there will be only 1 cop RPC request, then we can use max uint64 as tso too, there will be some performance improvements for small queries.
```sql
select * from t where id > 1 and id < 10;
```
### Drawback
This change may break linearizability, so this optimization can only be used when the `tidb_guarantee_linearizability` is disabled.
Contributor guide
Assessment
This issue has not been assessed yet.