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

refine IndexLookUp executor runtime stats #19349

Closed
crazycs520 opened this issue Aug 21, 2020 · 2 comments · Fixed by #20145
Closed

refine IndexLookUp executor runtime stats #19349

crazycs520 opened this issue Aug 21, 2020 · 2 comments · Fixed by #20145
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@crazycs520
Copy link
Contributor

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

Currently, the runtime stats of IndexLookUp is hard to understand, here is an example:

test> explain analyze select a+b from t1 use index (a) where a<100000 order by b limit 500;
+--------------------------------+----------+---------+-----------+----------------------+-------------------------------------------------------------------------------------------------------------+---------------------------------------+-------------------+------+
| id                             | estRows  | actRows | task      | access object        | execution info                                                                                              | operator info                         | memory            | disk |
+--------------------------------+----------+---------+-----------+----------------------+-------------------------------------------------------------------------------------------------------------+---------------------------------------+-------------------+------+
| Projection_9                   | 500.00   | 500     | root      |                      | time:145.126133ms, loops:2, Concurrency:OFF                                                                 | plus(test.t1.a, test.t1.b)->Column#4  | 8.34375 KB        | N/A  |
| └─TopN_11                      | 500.00   | 500     | root      |                      | time:145.112393ms, loops:2                                                                                  | test.t1.b, offset:0, count:500        | 12.25 KB          | N/A  |
|   └─IndexLookUp_19             | 500.00   | 50007   | root      |                      | time:144.250313ms, loops:51, cop_task: {num: 1, max:371.69µs, proc_keys: 0, rpc_num: 1, rpc_time: 363.18µs} |                                       | 1.529541015625 MB | N/A  |
|     ├─IndexRangeScan_16(Build) | 50021.28 | 50007   | cop[tikv] | table:t1, index:a(a) | time:21ms, loops:53                                                                                         | range:[-inf,100000), keep order:false | N/A               | N/A  |
|     └─TopN_18(Probe)           | 500.00   | 0       | cop[tikv] |                      | time:0ns, loops:0                                                                                           | test.t1.b, offset:0, count:500        | N/A               | N/A  |
|       └─TableRowIDScan_17      | 50021.28 | 0       | cop[tikv] | table:t1             | time:0ns, loops:0                                                                                           | keep order:false                      | N/A               | N/A  |
+--------------------------------+----------+---------+-----------+----------------------+-------------------------------------------------------------------------------------------------------------+---------------------------------------+-------------------+------+

there is some problem:

1.IndexLookUp reader uses IndexScan to read index first, and got the handle value from index value, then use TableRowIDScan to read data. So, we need to know the information such as below:

  • RPC runtime stats of IndexScan
  • RPC runtime stats of TableRowIDScan

Describe the feature you'd like:

Here is an example of IndexLookUp runtime stats:

time:300ms, loops:501, index_task: {num: 1, time: 10ms, rpc_num: 2, rpc_time: 8ms}, table_task: {num: 503, time: 290ms, rpc_num: 509, rpc_time: 8ms}, backoff: {tikvRPC: 10ms, regionMiss: 30ms}
@crazycs520 crazycs520 added the type/enhancement The issue or PR belongs to an enhancement. label Aug 21, 2020
@crazycs520
Copy link
Contributor Author

@qw4990 @zz-jason PTAL

@jyz0309
Copy link
Contributor

jyz0309 commented Aug 26, 2020

Alkaid will get it done:>

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
Development

Successfully merging a pull request may close this issue.

2 participants