pingcap / pingcap/tidb

`IndexLookUpExec` has an extra loop which is meaningless

Open
#56,407 1 comment 0 reactions 1 assignee Claimed by @yibin87 View on GitHub
severity/minor sig/execution type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

```
create table t (pk int auto_increment, col int, index idx (col));
insert into t(col) values (1);
explain analyze select * from t where col = 1;
```

### 2. What did you expect to see? (Required)

The loops in `execution info` of `IndexRangeScan` equals to 2

```
... time:1.29ms, loops:2 ...
```

### 3. What did you see instead (Required)

The loops in `execution info` of `IndexRangeScan` equals to 3

```
... time:2.95ms, loops:3 ...
```

### 4. What is your TiDB version? (Required)

```
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.4.0-alpha-290-gf2ed8228ff
Edition: Community
Git Commit Hash: f2ed8228ffc0cee144453ab334cdfe4aa5dac4a5
Git Branch: HEAD
UTC Build Time: 2024-09-27 01:12:36
GoVersion: go1.21.10
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.