You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
droptable if exists t;
createtablet (id int key auto_increment, b int, c int, index idx (b));
insert into t () values (), (), (), (), (), (), (), ();
insert into t (b) select b from t;
insert into t (b) select b from t;
insert into t (b) select b from t;
insert into t (b) select b from t;
insert into t (b) select b from t;
insert into t (b) select b from t;
insert into t (b) select b from t;
update t set b = id, c = id;
-- set following variables to default value. set @@tidb_enable_paging=1;
set @@tidb_min_paging_size=128;
set @@tidb_max_chunk_size=1024;
explain analyze select*from t use index(idx);
2. What did you see instead (Required)
The IndexFullScan_4 executor sends 3 cop RPC to scan index, but actually, 1 RPC is enough, because IndexLookUp_6 only has 1 table_task, which means IndexLookUp_6 neet to fetch initBatchSize which value will be 1024(from tidb_max_chunk_size=1024) index, then build a table task to execution. Enable paging is used to save memory, but in this case, enable paging with default tidb_min_paging_size is not a good idea, it will introduce redundancy RPC.
1. Minimal reproduce step (Required)
2. What did you see instead (Required)
The
IndexFullScan_4
executor sends 3 cop RPC to scan index, but actually, 1 RPC is enough, becauseIndexLookUp_6
only has 1 table_task, which meansIndexLookUp_6
neet to fetch initBatchSize which value will be 1024(from tidb_max_chunk_size=1024) index, then build a table task to execution. Enable paging is used to save memory, but in this case, enable paging with defaulttidb_min_paging_size
is not a good idea, it will introduce redundancy RPC.3. What did you expect to see?
IndexFullScan_4
only send 1 RPC.4. What is your TiDB version? (Required)
nightly: a6e1a2e
The text was updated successfully, but these errors were encountered: