Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try use max uint64 as tso for table/index reader which only has 1 cop task and in autocommit txn #56018

Open
crazycs520 opened this issue Sep 11, 2024 · 0 comments · May be fixed by #56016
Open
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@crazycs520
Copy link
Contributor

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:

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.

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.

@crazycs520 crazycs520 added the type/enhancement The issue or PR belongs to an enhancement. label Sep 11, 2024
@crazycs520 crazycs520 self-assigned this Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
1 participant