The explain result for some PointGet plans should be improved
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
When some PointGet plans will happen twice in a query, but the explain result can not see that. It would be misleading to investigate the problem.
```
mysql> create table t(a double, b int, primary key(a) nonclustered);
Query OK, 0 rows affected (0.02 sec)
mysql> explain select * from t where a = 1;
+-------------+---------+------+---------------------------+---------------+
| id | estRows | task | access object | operator info |
+-------------+---------+------+---------------------------+---------------+
| Point_Get_1 | 1.00 | root | table:t, index:PRIMARY(a) | |
+-------------+---------+------+---------------------------+---------------+
1 row in set (0.00 sec)
```
For the non-clustered index, it will use the primary key to get the row_id first and use the row_id to get the row values. To sum up, it will use PointGet twice to get the result. But the explain can only show once.
Contributor guide
Assessment
This issue has not been assessed yet.