pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
36.88k stars 5.8k forks source link

show handles in batch point get plan if possible #14853

Closed zz-jason closed 4 years ago

zz-jason commented 4 years ago

Feature Request

Is your feature request related to a problem? Please describe:

it's hard to tell what handles are used to extracted data from storage

Describe the feature you'd like:

show handles in the explain result, like the following one:

TiDB(root@127.0.0.1:test) > explain for connection 1;
+-------------------------+-------+------+-----------------------------------------+
| id                      | count | task | operator info                           |
+-------------------------+-------+------+-----------------------------------------+
| _0                      | N/A   | root | N/A                                     |
| └─Batch_Point_Get_1     | 2.00  | root | table:bmsql_item, handles: [123 456]    |
+-------------------------+-------+------+-----------------------------------------+
2 rows in set (0.00 sec)

Describe alternatives you've considered:

No

Teachability, Documentation, Adoption, Migration Strategy:

No

zz-jason commented 4 years ago

@LittleFall PTAL.

LittleFall commented 4 years ago

Sorry for I didn't understand it well, can you give the expected result for the example? @zz-jason

zz-jason commented 4 years ago

It has been resolved:


TiDB(root@127.0.0.1:test) > explain for connection 4;
+-------------------+---------+------+------------------+------------------------------------------------+
| id                | estRows | task | access object    | operator info                                  |
+-------------------+---------+------+------------------+------------------------------------------------+
| Batch_Point_Get_1 | 2.00    | root | table:bmsql_item | handle:[123 456], keep order:false, desc:false |
+-------------------+---------+------+------------------+------------------------------------------------+
1 row in set (0.00 sec)```