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

runtime stats get lost if the index merge partial task return 0 row #35296

Closed
time-and-fate opened this issue Jun 10, 2022 · 0 comments · Fixed by #35297
Closed

runtime stats get lost if the index merge partial task return 0 row #35296

time-and-fate opened this issue Jun 10, 2022 · 0 comments · Fixed by #35297
Assignees
Labels
severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@time-and-fate
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a int, b int , c int, d int, e int,index ia(a), index ib(b), index ic(c), index idd(d), index ie(e));
explain analyze select * from t where a = 10 or b = 30 or c = 10 or d = 1 or e = 90;

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

The "time" of "execution info" of IndexRangeScan is not 0.

3. What did you see instead (Required)

explain analyze select * from t where a = 10 or b = 30 or c = 10 or d = 1 or e = 90;
+--------------------------------+---------+---------+-----------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------+-----------+------+
| id                             | estRows | actRows | task      | access object         | execution info                                                                                                                                                    | operator info                                 | memory    | disk |
+--------------------------------+---------+---------+-----------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------+-----------+------+
| IndexMerge_14                  | 0.04    | 0       | root      |                       | time:1.4ms, loops:1,                                                                                                                                              |                                               | 498 Bytes | N/A  |
| ├─IndexRangeScan_8(Build)      | 0.01    | 0       | cop[tikv] | table:t, index:ia(a)  | time:0s, loops:0, cop_task: {num: 1, max: 483.8µs, proc_keys: 0, rpc_num: 1, rpc_time: 370.8µs, copr_cache_hit_ratio: 0.00}, tikv_task:{time:312.2µs, loops:0}    | range:[10,10], keep order:false, stats:pseudo | N/A       | N/A  |
| ├─IndexRangeScan_9(Build)      | 0.01    | 0       | cop[tikv] | table:t, index:ib(b)  | time:0s, loops:0, cop_task: {num: 1, max: 658.7µs, proc_keys: 0, rpc_num: 1, rpc_time: 520.7µs, copr_cache_hit_ratio: 0.00}, tikv_task:{time:456.9µs, loops:0}    | range:[30,30], keep order:false, stats:pseudo | N/A       | N/A  |
| ├─IndexRangeScan_10(Build)     | 0.01    | 0       | cop[tikv] | table:t, index:ic(c)  | time:0s, loops:0, cop_task: {num: 1, max: 617µs, proc_keys: 0, rpc_num: 1, rpc_time: 516.3µs, copr_cache_hit_ratio: 0.00}, tikv_task:{time:446.3µs, loops:0}      | range:[10,10], keep order:false, stats:pseudo | N/A       | N/A  |
| ├─IndexRangeScan_11(Build)     | 0.01    | 0       | cop[tikv] | table:t, index:idd(d) | time:0s, loops:0, cop_task: {num: 1, max: 441.8µs, proc_keys: 0, rpc_num: 1, rpc_time: 356.8µs, copr_cache_hit_ratio: 0.00}, tikv_task:{time:304.7µs, loops:0}    | range:[1,1], keep order:false, stats:pseudo   | N/A       | N/A  |
| ├─IndexRangeScan_12(Build)     | 0.01    | 0       | cop[tikv] | table:t, index:ie(e)  | time:0s, loops:0, cop_task: {num: 1, max: 531.6µs, proc_keys: 0, rpc_num: 1, rpc_time: 435.3µs, copr_cache_hit_ratio: 0.00}, tikv_task:{time:369.7µs, loops:0}    | range:[90,90], keep order:false, stats:pseudo | N/A       | N/A  |
| └─TableRowIDScan_13(Probe)     | 0.04    | 0       | cop[tikv] | table:t               |                                                                                                                                                                   | keep order:false, stats:pseudo                | N/A       | N/A  |
+--------------------------------+---------+---------+-----------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------+-----------+------+

4. What is your TiDB version? (Required)

master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
2 participants