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

The plan of QUERY_19 in tpcds-50g-tikv changed in the same benchmark #53174

Closed
Yui-Song opened this issue May 10, 2024 · 3 comments
Closed

The plan of QUERY_19 in tpcds-50g-tikv changed in the same benchmark #53174

Yui-Song opened this issue May 10, 2024 · 3 comments
Assignees

Comments

@Yui-Song
Copy link
Contributor

Yui-Song commented May 10, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. deploy a tidb cluster with 1 tidb and 3 tikv
  2. run QUERY_19 in benchmark tpcds sf=50g
select  i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact,
 	sum(ss_ext_sales_price) ext_price
 from date_dim, store_sales, item,customer,customer_address,store
 where d_date_sk = ss_sold_date_sk
   and ss_item_sk = i_item_sk
   and i_manager_id=7
   and d_moy=11
   and d_year=1999
   and ss_customer_sk = c_customer_sk
   and c_current_addr_sk = ca_address_sk
   and substr(ca_zip,1,5) <> substr(s_zip,1,5)
   and ss_store_sk = s_store_sk
 group by i_brand
      ,i_brand_id
      ,i_manufact_id
      ,i_manufact
 order by ext_price desc
         ,i_brand
         ,i_brand_id
         ,i_manufact_id
         ,i_manufact
limit 100 ;

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

No plan changed in one benchmark.

3. What did you see instead (Required)

Olap_Detail_Log_ID: 6502301   Plan_Digest: 93dd528606ef808c18e752186eb5b92b Elapsed_Time (s): 10.8 

+----------------------------------------+--------------+-----------+-----------+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+
| ID                                     | ESTROWS      | ACTROWS   | TASK      | ACCESS OBJECT          | EXECUTION INFO                                                                                                                                                                                                                                                                                                                                                               | OPERATOR INFO                                                                                                                                                                                                                                                                                                                                                                                                                                      | MEMORY   | DISK    |
+----------------------------------------+--------------+-----------+-----------+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+
| Projection_27                          | 18.10        | 100       | root      |                        | time:10.8s, loops:2, RU:485642.889023, Concurrency:OFF                                                                                                                                                                                                                                                                                                                       | tpcds50.item.i_brand_id, tpcds50.item.i_brand, tpcds50.item.i_manufact_id, tpcds50.item.i_manufact, Column#135                                                                                                                                                                                                                                                                                                                                     | 53.1 KB  | N/A     |
| └─TopN_30                              | 18.10        | 100       | root      |                        | time:10.8s, loops:2                                                                                                                                                                                                                                                                                                                                                          | Column#135:desc, tpcds50.item.i_brand, tpcds50.item.i_brand_id, tpcds50.item.i_manufact_id, tpcds50.item.i_manufact, offset:0, count:100                                                                                                                                                                                                                                                                                                           | 22.6 KB  | N/A     |
|   └─HashAgg_35                         | 18.10        | 583       | root      |                        | time:10.8s, loops:6, partial_worker:{wall_time:10.777601195s, concurrency:5, task_num:78, tot_wait:53.841437304s, tot_exec:46.32348ms, tot_time:53.887817498s, max:10.777566693s, p95:10.777566693s}, final_worker:{wall_time:10.777849975s, concurrency:5, task_num:25, tot_wait:9.536µs, tot_exec:704.528µs, tot_time:53.888935389s, max:10.777819647s, p95:10.777819647s} | group by:tpcds50.item.i_brand, tpcds50.item.i_brand_id, tpcds50.item.i_manufact, tpcds50.item.i_manufact_id, funcs:sum(tpcds50.store_sales.ss_ext_sales_price)->Column#135, funcs:firstrow(tpcds50.item.i_brand_id)->tpcds50.item.i_brand_id, funcs:firstrow(tpcds50.item.i_brand)->tpcds50.item.i_brand, funcs:firstrow(tpcds50.item.i_manufact_id)->tpcds50.item.i_manufact_id, funcs:firstrow(tpcds50.item.i_manufact)->tpcds50.item.i_manufact | 2.62 MB  | 0 Bytes |
|     └─HashJoin_47                      | 49101.19     | 76204     | root      |                        | time:10.8s, loops:79, build_hash_table:{total:10.7s, fetch:10.7s, build:19.6ms}, probe:{concurrency:5, total:53.9s, max:10.8s, probe:381.3ms, fetch:53.5s}                                                                                                                                                                                                                   | inner join, equal:[eq(tpcds50.customer.c_current_addr_sk, tpcds50.customer_address.ca_address_sk)], other cond:ne(substr(tpcds50.customer_address.ca_zip, 1, 5), substr(tpcds50.store.s_zip, 1, 5))                                                                                                                                                                                                                                                | 14.8 MB  | 0 Bytes |
|       ├─IndexJoin_54(Build)            | 49101.19     | 79761     | root      |                        | time:10.7s, loops:79, inner:{total:859.1ms, concurrency:5, task:11, construct:62.5ms, fetch:779.4ms, build:17.1ms}, probe:42ms                                                                                                                                                                                                                                               | inner join, inner:TableReader_50, outer key:tpcds50.store_sales.ss_customer_sk, inner key:tpcds50.customer.c_customer_sk, equal cond:eq(tpcds50.store_sales.ss_customer_sk, tpcds50.customer.c_customer_sk)                                                                                                                                                                                                                                        | 5.74 MB  | N/A     |
|       │ ├─HashJoin_70(Build)           | 48884.79     | 79761     | root      |                        | time:10.6s, loops:82, build_hash_table:{total:261.2µs, fetch:218.3µs, build:42.9µs}, probe:{concurrency:5, total:52.9s, max:10.6s, probe:54.9ms, fetch:52.9s}                                                                                                                                                                                                                | inner join, equal:[eq(tpcds50.store_sales.ss_store_sk, tpcds50.store.s_store_sk)]                                                                                                                                                                                                                                                                                                                                                                  | 27.7 KB  | 0 Bytes |
|       │ │ ├─TableReader_127(Build)     | 144.00       | 144       | root      |                        | time:200.3µs, loops:2, cop_task: {num: 1, max: 659µs, proc_keys: 144, tot_proc: 281.1µs, tot_wait: 27.4µs, rpc_num: 1, rpc_time: 632.3µs, copr_cache_hit_ratio: 0.00, build_task_duration: 1.5µs, max_distsql_concurrency: 1}                                                                                                                                                | data:TableFullScan_126                                                                                                                                                                                                                                                                                                                                                                                                                             | 3.28 KB  | N/A     |
|       │ │ │ └─TableFullScan_126        | 144.00       | 144       | cop[tikv] | table:store            | tikv_task:{time:0s, loops:3}, scan_detail: {total_process_keys: 144, total_process_keys_size: 49490, total_keys: 145, get_snapshot_time: 13.4µs, rocksdb: {key_skipped_count: 285, block: {cache_hit_count: 4}}}                                                                                                                                                             | keep order:false                                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ │ └─HashJoin_84(Probe)         | 48884.79     | 79761     | root      |                        | time:10.6s, loops:81, build_hash_table:{total:78ms, fetch:77.8ms, build:198.2µs}, probe:{concurrency:5, total:52.9s, max:10.6s, probe:507.6ms, fetch:52.4s}                                                                                                                                                                                                                  | inner join, equal:[eq(tpcds50.store_sales.ss_item_sk, tpcds50.item.i_item_sk)]                                                                                                                                                                                                                                                                                                                                                                     | 202.7 KB | 0 Bytes |
|       │ │   ├─TableReader_125(Build)   | 1122.00      | 1122      | root      |                        | time:77.7ms, loops:3, cop_task: {num: 1, max: 78ms, proc_keys: 62000, tot_proc: 77.1ms, tot_wait: 23.4µs, rpc_num: 1, rpc_time: 77.9ms, copr_cache_hit_ratio: 0.00, build_task_duration: 3.12µs, max_distsql_concurrency: 1}                                                                                                                                                 | data:Selection_124                                                                                                                                                                                                                                                                                                                                                                                                                                 | 87.3 KB  | N/A     |
|       │ │   │ └─Selection_124          | 1122.00      | 1122      | cop[tikv] |                        | tikv_task:{time:77ms, loops:65}, scan_detail: {total_process_keys: 62000, total_process_keys_size: 21332103, total_keys: 62001, get_snapshot_time: 12.2µs, rocksdb: {key_skipped_count: 112089, block: {cache_hit_count: 362}}}                                                                                                                                              | eq(tpcds50.item.i_manager_id, 7)                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ │   │   └─TableFullScan_123    | 62000.00     | 62000     | cop[tikv] | table:item             | tikv_task:{time:77ms, loops:65}                                                                                                                                                                                                                                                                                                                                              | keep order:false                                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ │   └─HashJoin_116(Probe)      | 2368209.02   | 4243511   | root      |                        | time:10.6s, loops:4148, build_hash_table:{total:51.8ms, fetch:51.8ms, build:17.2µs}, probe:{concurrency:5, total:52.9s, max:10.6s, probe:12s, fetch:41s}                                                                                                                                                                                                                     | inner join, equal:[eq(tpcds50.date_dim.d_date_sk, tpcds50.store_sales.ss_sold_date_sk)]                                                                                                                                                                                                                                                                                                                                                            | 25.9 KB  | 0 Bytes |
|       │ │     ├─TableReader_122(Build) | 29.98        | 30        | root      |                        | time:51.8ms, loops:2, cop_task: {num: 1, max: 52.8ms, proc_keys: 73049, tot_proc: 52.3ms, tot_wait: 21.5µs, rpc_num: 1, rpc_time: 52.8ms, copr_cache_hit_ratio: 0.00, build_task_duration: 6.39µs, max_distsql_concurrency: 1}                                                                                                                                               | data:Selection_121                                                                                                                                                                                                                                                                                                                                                                                                                                 | 1.01 KB  | N/A     |
|       │ │     │ └─Selection_121        | 29.98        | 30        | cop[tikv] |                        | tikv_task:{time:52ms, loops:76}, scan_detail: {total_process_keys: 73049, total_process_keys_size: 14080093, total_keys: 73050, get_snapshot_time: 9.79µs, rocksdb: {key_skipped_count: 73049, block: {cache_hit_count: 232}}}                                                                                                                                               | eq(tpcds50.date_dim.d_moy, 11), eq(tpcds50.date_dim.d_year, 1999)                                                                                                                                                                                                                                                                                                                                                                                  | N/A      | N/A     |
|       │ │     │   └─TableFullScan_120  | 73049.00     | 73049     | cop[tikv] | table:date_dim         | tikv_task:{time:50ms, loops:76}                                                                                                                                                                                                                                                                                                                                              | keep order:false                                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ │     └─TableReader_119(Probe) | 125438666.93 | 132669487 | root      |                        | time:8.15s, loops:140740, cop_task: {num: 275, max: 844.8ms, min: 557.4µs, avg: 553.3ms, p95: 700.8ms, max_proc_keys: 625244, p95_proc_keys: 556212, tot_proc: 2m17.7s, tot_wait: 12.7ms, rpc_num: 275, rpc_time: 2m32.1s, copr_cache_hit_ratio: 0.00, build_task_duration: 368.1µs, max_distsql_concurrency: 15}                                                            | data:Selection_118                                                                                                                                                                                                                                                                                                                                                                                                                                 | 101.7 MB | N/A     |
|       │ │       └─Selection_118        | 125438666.93 | 132669487 | cop[tikv] |                        | tikv_task:{proc max:714ms, min:0s, avg: 429.4ms, p80:464ms, p95:552ms, iters:141864, tasks:275}, scan_detail: {total_process_keys: 144004764, total_process_keys_size: 28682913939, total_keys: 144005039, get_snapshot_time: 7.22ms, rocksdb: {key_skipped_count: 144004764, block: {cache_hit_count: 468821}}}                                                             | not(isnull(tpcds50.store_sales.ss_customer_sk)), not(isnull(tpcds50.store_sales.ss_sold_date_sk)), not(isnull(tpcds50.store_sales.ss_store_sk))                                                                                                                                                                                                                                                                                                    | N/A      | N/A     |
|       │ │         └─TableFullScan_117  | 144004764.00 | 144004764 | cop[tikv] | table:store_sales      | tikv_task:{proc max:648ms, min:0s, avg: 385.3ms, p80:416ms, p95:500ms, iters:141864, tasks:275}                                                                                                                                                                                                                                                                              | keep order:false                                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ └─TableReader_50(Probe)        | 48884.79     | 70890     | root      |                        | time:749.4ms, loops:85, cop_task: {num: 22, max: 179ms, min: 2.46ms, avg: 39.5ms, p95: 119ms, max_proc_keys: 18303, p95_proc_keys: 13162, tot_proc: 362.1ms, tot_wait: 1.71ms, rpc_num: 22, rpc_time: 868.3ms, copr_cache_hit_ratio: 0.00, build_task_duration: 2.5ms, max_distsql_concurrency: 2}                                                                           | data:Selection_49                                                                                                                                                                                                                                                                                                                                                                                                                                  | N/A      | N/A     |
|       │   └─Selection_49               | 48884.79     | 70890     | cop[tikv] |                        | tikv_task:{proc max:97ms, min:1ms, avg: 19.1ms, p80:28ms, p95:93ms, iters:157, tasks:22}, scan_detail: {total_process_keys: 70890, total_process_keys_size: 12127498, total_keys: 72252, get_snapshot_time: 1.25ms, rocksdb: {key_skipped_count: 2769, block: {cache_hit_count: 18031}}}                                                                                     | not(isnull(tpcds50.customer.c_current_addr_sk))                                                                                                                                                                                                                                                                                                                                                                                                    | N/A      | N/A     |
|       │     └─TableRangeScan_48        | 48884.79     | 70890     | cop[tikv] | table:customer         | tikv_task:{proc max:96ms, min:1ms, avg: 18.9ms, p80:28ms, p95:93ms, iters:157, tasks:22}                                                                                                                                                                                                                                                                                     | range: decided by [tpcds50.store_sales.ss_customer_sk], keep order:false                                                                                                                                                                                                                                                                                                                                                                           | N/A      | N/A     |
|       └─TableReader_132(Probe)         | 383000.00    | 383000    | root      |                        | time:266.3ms, loops:376, cop_task: {num: 1, max: 260.6ms, proc_keys: 383000, tot_proc: 250.2ms, tot_wait: 298.2µs, rpc_num: 1, rpc_time: 260.5ms, copr_cache_hit_ratio: 0.00, build_task_duration: 1.75µs, max_distsql_concurrency: 1}                                                                                                                                       | data:TableFullScan_131                                                                                                                                                                                                                                                                                                                                                                                                                             | 7.67 MB  | N/A     |
|         └─TableFullScan_131            | 383000.00    | 383000    | cop[tikv] | table:customer_address | tikv_task:{time:225ms, loops:379}, scan_detail: {total_process_keys: 383000, total_process_keys_size: 62117234, total_keys: 383001, get_snapshot_time: 284.6µs, rocksdb: {key_skipped_count: 383000, block: {cache_hit_count: 1030}}}                                                                                                                                        | keep order:false                                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
+----------------------------------------+--------------+-----------+-----------+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+

Olap_Detail_Log_ID: 6502221   Plan_Digest: 5d7410b546378be29db39b1471379d43 Elapsed_Time (s): 11.0 

+----------------------------------------+--------------+-----------+-----------+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+
| ID                                     | ESTROWS      | ACTROWS   | TASK      | ACCESS OBJECT          | EXECUTION INFO                                                                                                                                                                                                                                                                                                                                                             | OPERATOR INFO                                                                                                                                                                                                                                                                                                                                                                                                                                      | MEMORY   | DISK    |
+----------------------------------------+--------------+-----------+-----------+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+
| Projection_27                          | 18.10        | 100       | root      |                        | time:11s, loops:2, RU:484804.442942, Concurrency:OFF                                                                                                                                                                                                                                                                                                                       | tpcds50.item.i_brand_id, tpcds50.item.i_brand, tpcds50.item.i_manufact_id, tpcds50.item.i_manufact, Column#135                                                                                                                                                                                                                                                                                                                                     | 53.1 KB  | N/A     |
| └─TopN_30                              | 18.10        | 100       | root      |                        | time:11s, loops:2                                                                                                                                                                                                                                                                                                                                                          | Column#135:desc, tpcds50.item.i_brand, tpcds50.item.i_brand_id, tpcds50.item.i_manufact_id, tpcds50.item.i_manufact, offset:0, count:100                                                                                                                                                                                                                                                                                                           | 22.6 KB  | N/A     |
|   └─HashAgg_35                         | 18.10        | 583       | root      |                        | time:11s, loops:6, partial_worker:{wall_time:10.964414823s, concurrency:5, task_num:75, tot_wait:54.77994135s, tot_exec:41.807891ms, tot_time:54.821799822s, max:10.964366637s, p95:10.964366637s}, final_worker:{wall_time:10.964668544s, concurrency:5, task_num:25, tot_wait:11.741µs, tot_exec:908.54µs, tot_time:54.823137293s, max:10.964651834s, p95:10.964651834s} | group by:tpcds50.item.i_brand, tpcds50.item.i_brand_id, tpcds50.item.i_manufact, tpcds50.item.i_manufact_id, funcs:sum(tpcds50.store_sales.ss_ext_sales_price)->Column#135, funcs:firstrow(tpcds50.item.i_brand_id)->tpcds50.item.i_brand_id, funcs:firstrow(tpcds50.item.i_brand)->tpcds50.item.i_brand, funcs:firstrow(tpcds50.item.i_manufact_id)->tpcds50.item.i_manufact_id, funcs:firstrow(tpcds50.item.i_manufact)->tpcds50.item.i_manufact | 2.56 MB  | 0 Bytes |
|     └─IndexJoin_41                     | 49101.19     | 76204     | root      |                        | time:11s, loops:76, inner:{total:543.8ms, concurrency:5, task:11, construct:58.4ms, fetch:472.4ms, build:13ms}, probe:178.8ms                                                                                                                                                                                                                                              | inner join, inner:TableReader_38, outer key:tpcds50.customer.c_current_addr_sk, inner key:tpcds50.customer_address.ca_address_sk, equal cond:eq(tpcds50.customer.c_current_addr_sk, tpcds50.customer_address.ca_address_sk), other cond:ne(substr(tpcds50.customer_address.ca_zip, 1, 5), substr(tpcds50.store.s_zip, 1, 5))                                                                                                                       | 6.22 MB  | N/A     |
|       ├─IndexJoin_54(Build)            | 49101.19     | 79761     | root      |                        | time:10.8s, loops:83, inner:{total:783.6ms, concurrency:5, task:11, construct:59.9ms, fetch:708.2ms, build:15.5ms}, probe:44ms                                                                                                                                                                                                                                             | inner join, inner:TableReader_50, outer key:tpcds50.store_sales.ss_customer_sk, inner key:tpcds50.customer.c_customer_sk, equal cond:eq(tpcds50.store_sales.ss_customer_sk, tpcds50.customer.c_customer_sk)                                                                                                                                                                                                                                        | 5.76 MB  | N/A     |
|       │ ├─HashJoin_70(Build)           | 48884.79     | 79761     | root      |                        | time:10.7s, loops:82, build_hash_table:{total:487.6µs, fetch:452.6µs, build:35µs}, probe:{concurrency:5, total:53.5s, max:10.7s, probe:51.6ms, fetch:53.4s}                                                                                                                                                                                                                | inner join, equal:[eq(tpcds50.store_sales.ss_store_sk, tpcds50.store.s_store_sk)]                                                                                                                                                                                                                                                                                                                                                                  | 27.7 KB  | 0 Bytes |
|       │ │ ├─TableReader_127(Build)     | 144.00       | 144       | root      |                        | time:434.2µs, loops:2, cop_task: {num: 1, max: 615.6µs, proc_keys: 144, tot_proc: 264.9µs, tot_wait: 24.4µs, rpc_num: 1, rpc_time: 598.9µs, copr_cache_hit_ratio: 0.00, build_task_duration: 1.91µs, max_distsql_concurrency: 1}                                                                                                                                           | data:TableFullScan_126                                                                                                                                                                                                                                                                                                                                                                                                                             | 3.28 KB  | N/A     |
|       │ │ │ └─TableFullScan_126        | 144.00       | 144       | cop[tikv] | table:store            | tikv_task:{time:0s, loops:3}, scan_detail: {total_process_keys: 144, total_process_keys_size: 49490, total_keys: 145, get_snapshot_time: 11.8µs, rocksdb: {key_skipped_count: 285, block: {cache_hit_count: 4}}}                                                                                                                                                           | keep order:false                                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ │ └─HashJoin_84(Probe)         | 48884.79     | 79761     | root      |                        | time:10.7s, loops:81, build_hash_table:{total:74.9ms, fetch:74.8ms, build:169.3µs}, probe:{concurrency:5, total:53.5s, max:10.7s, probe:523ms, fetch:52.9s}                                                                                                                                                                                                                | inner join, equal:[eq(tpcds50.store_sales.ss_item_sk, tpcds50.item.i_item_sk)]                                                                                                                                                                                                                                                                                                                                                                     | 183.5 KB | 0 Bytes |
|       │ │   ├─TableReader_125(Build)   | 1122.00      | 1122      | root      |                        | time:74.7ms, loops:3, cop_task: {num: 1, max: 75ms, proc_keys: 62000, tot_proc: 74ms, tot_wait: 28.9µs, rpc_num: 1, rpc_time: 75ms, copr_cache_hit_ratio: 0.00, build_task_duration: 3.47µs, max_distsql_concurrency: 1}                                                                                                                                                   | data:Selection_124                                                                                                                                                                                                                                                                                                                                                                                                                                 | 87.4 KB  | N/A     |
|       │ │   │ └─Selection_124          | 1122.00      | 1122      | cop[tikv] |                        | tikv_task:{time:74ms, loops:65}, scan_detail: {total_process_keys: 62000, total_process_keys_size: 21332103, total_keys: 62001, get_snapshot_time: 19.3µs, rocksdb: {key_skipped_count: 112089, block: {cache_hit_count: 362}}}                                                                                                                                            | eq(tpcds50.item.i_manager_id, 7)                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ │   │   └─TableFullScan_123    | 62000.00     | 62000     | cop[tikv] | table:item             | tikv_task:{time:73ms, loops:65}                                                                                                                                                                                                                                                                                                                                            | keep order:false                                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ │   └─HashJoin_116(Probe)      | 2368209.02   | 4243511   | root      |                        | time:10.7s, loops:4149, build_hash_table:{total:44.1ms, fetch:44ms, build:13.2µs}, probe:{concurrency:5, total:53.5s, max:10.7s, probe:11.9s, fetch:41.6s}                                                                                                                                                                                                                 | inner join, equal:[eq(tpcds50.date_dim.d_date_sk, tpcds50.store_sales.ss_sold_date_sk)]                                                                                                                                                                                                                                                                                                                                                            | 25.9 KB  | 0 Bytes |
|       │ │     ├─TableReader_122(Build) | 29.98        | 30        | root      |                        | time:44ms, loops:2, cop_task: {num: 1, max: 44.9ms, proc_keys: 73049, tot_proc: 44.5ms, tot_wait: 23.9µs, rpc_num: 1, rpc_time: 44.9ms, copr_cache_hit_ratio: 0.00, build_task_duration: 4.71µs, max_distsql_concurrency: 1}                                                                                                                                               | data:Selection_121                                                                                                                                                                                                                                                                                                                                                                                                                                 | 1.01 KB  | N/A     |
|       │ │     │ └─Selection_121        | 29.98        | 30        | cop[tikv] |                        | tikv_task:{time:44ms, loops:76}, scan_detail: {total_process_keys: 73049, total_process_keys_size: 14080093, total_keys: 73050, get_snapshot_time: 9.95µs, rocksdb: {key_skipped_count: 73049, block: {cache_hit_count: 232}}}                                                                                                                                             | eq(tpcds50.date_dim.d_moy, 11), eq(tpcds50.date_dim.d_year, 1999)                                                                                                                                                                                                                                                                                                                                                                                  | N/A      | N/A     |
|       │ │     │   └─TableFullScan_120  | 73049.00     | 73049     | cop[tikv] | table:date_dim         | tikv_task:{time:42ms, loops:76}                                                                                                                                                                                                                                                                                                                                            | keep order:false                                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ │     └─TableReader_119(Probe) | 125438666.93 | 132669487 | root      |                        | time:8.29s, loops:140741, cop_task: {num: 275, max: 871.2ms, min: 567µs, avg: 551.9ms, p95: 673.7ms, max_proc_keys: 625244, p95_proc_keys: 556212, tot_proc: 2m17.5s, tot_wait: 14.2ms, rpc_num: 275, rpc_time: 2m31.8s, copr_cache_hit_ratio: 0.00, build_task_duration: 422.6µs, max_distsql_concurrency: 15}                                                            | data:Selection_118                                                                                                                                                                                                                                                                                                                                                                                                                                 | 165.7 MB | N/A     |
|       │ │       └─Selection_118        | 125438666.93 | 132669487 | cop[tikv] |                        | tikv_task:{proc max:729ms, min:0s, avg: 428.4ms, p80:463ms, p95:542ms, iters:141864, tasks:275}, scan_detail: {total_process_keys: 144004764, total_process_keys_size: 28682913939, total_keys: 144005039, get_snapshot_time: 8.44ms, rocksdb: {key_skipped_count: 144004764, block: {cache_hit_count: 468821}}}                                                           | not(isnull(tpcds50.store_sales.ss_customer_sk)), not(isnull(tpcds50.store_sales.ss_sold_date_sk)), not(isnull(tpcds50.store_sales.ss_store_sk))                                                                                                                                                                                                                                                                                                    | N/A      | N/A     |
|       │ │         └─TableFullScan_117  | 144004764.00 | 144004764 | cop[tikv] | table:store_sales      | tikv_task:{proc max:658ms, min:0s, avg: 383.2ms, p80:416ms, p95:487ms, iters:141864, tasks:275}                                                                                                                                                                                                                                                                            | keep order:false                                                                                                                                                                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|       │ └─TableReader_50(Probe)        | 48884.79     | 70898     | root      |                        | time:683.1ms, loops:85, cop_task: {num: 22, max: 160.7ms, min: 2.24ms, avg: 37.8ms, p95: 108.8ms, max_proc_keys: 18315, p95_proc_keys: 13154, tot_proc: 347.4ms, tot_wait: 32.5ms, rpc_num: 22, rpc_time: 831.5ms, copr_cache_hit_ratio: 0.00, build_task_duration: 2.58ms, max_distsql_concurrency: 2}                                                                    | data:Selection_49                                                                                                                                                                                                                                                                                                                                                                                                                                  | N/A      | N/A     |
|       │   └─Selection_49               | 48884.79     | 70898     | cop[tikv] |                        | tikv_task:{proc max:93ms, min:1ms, avg: 18.3ms, p80:22ms, p95:93ms, iters:157, tasks:22}, scan_detail: {total_process_keys: 70898, total_process_keys_size: 12128683, total_keys: 72282, get_snapshot_time: 32ms, rocksdb: {key_skipped_count: 2812, block: {cache_hit_count: 18076}}}                                                                                     | not(isnull(tpcds50.customer.c_current_addr_sk))                                                                                                                                                                                                                                                                                                                                                                                                    | N/A      | N/A     |
|       │     └─TableRangeScan_48        | 48884.79     | 70898     | cop[tikv] | table:customer         | tikv_task:{proc max:93ms, min:1ms, avg: 18.2ms, p80:22ms, p95:92ms, iters:157, tasks:22}                                                                                                                                                                                                                                                                                   | range: decided by [tpcds50.store_sales.ss_customer_sk], keep order:false                                                                                                                                                                                                                                                                                                                                                                           | N/A      | N/A     |
|       └─TableReader_38(Probe)          | 49101.19     | 69363     | root      |                        | time:446.8ms, loops:85, cop_task: {num: 11, max: 130.2ms, min: 1.79ms, avg: 40.4ms, p95: 130.2ms, max_proc_keys: 21962, p95_proc_keys: 21962, tot_proc: 288.8ms, tot_wait: 768.7µs, rpc_num: 11, rpc_time: 444.4ms, copr_cache_hit_ratio: 0.00, build_task_duration: 2.52ms, max_distsql_concurrency: 1}                                                                   | data:TableRangeScan_37                                                                                                                                                                                                                                                                                                                                                                                                                             | N/A      | N/A     |
|         └─TableRangeScan_37            | 49101.19     | 69363     | cop[tikv] | table:customer_address | tikv_task:{proc max:107ms, min:1ms, avg: 32.3ms, p80:68ms, p95:107ms, iters:111, tasks:11}, scan_detail: {total_process_keys: 69363, total_process_keys_size: 11248471, total_keys: 72090, get_snapshot_time: 530.5µs, rocksdb: {key_skipped_count: 5596, block: {cache_hit_count: 12820}}}                                                                                | range: decided by [tpcds50.customer.c_current_addr_sk], keep order:false                                                                                                                                                                                                                                                                                                                                                                           | N/A      | N/A     |
+----------------------------------------+--------------+-----------+-----------+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+

4. What is your TiDB version? (Required)

commit 0ed511a

@Yui-Song Yui-Song added the type/bug This issue is a bug. label May 10, 2024
@Yui-Song
Copy link
Contributor Author

/severity moderate
/sig planner
/component statistics
assign @winoros

@Yui-Song
Copy link
Contributor Author

/assign @winoros

@hawkingrei
Copy link
Member

It has been fixed by #53297 and #53137 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants