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

HashAgg fails to be push-downed to TiFlash resulting in performance regression in TPCH and TPCDS #35711

Closed
Yui-Song opened this issue Jun 24, 2022 · 1 comment
Assignees
Labels
severity/critical sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@Yui-Song
Copy link
Contributor

Yui-Song commented Jun 24, 2022

Bug Report

Because of PR #35438, HashAgg fails to be push-downed to TiFlash resulting in performance regression in THCH and TPCDS.

The elapsed time of Q97, Q75,Q51 in TPCDS 50g with 1 TiFlash increased by more than 10s.
The elapsed time of Q9 in TPCH with 1 TiFlash increased by more than 400s.

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Deploy TiDB cluster with 1 TiFlash and run TPCH 50g
Deploy TiDB cluster with 1 TiFlash and run TPCDS 50g

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

Baseline commit 06737ec

Baseline Execution Plans
Plan_Digest: a3662bd17619b4a4a17240c04654f537 Elapsed_Time (s): 21.2 

+----------------------------------------------------------------------------+--------------+-----------+--------------+----------------+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------+
| ID                                                                         | ESTROWS      | ACTROWS   | TASK         | ACCESS OBJECT  | EXECUTION INFO                                                                                          | OPERATOR INFO                                                                                                                                                                                                               | MEMORY  | DISK    |
+----------------------------------------------------------------------------+--------------+-----------+--------------+----------------+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------+
| Sort_26                                                                    | 2406.00      | 175       | root         |                | time:21.2s, loops:2                                                                                     | test.nation.n_name, Column#53:desc                                                                                                                                                                                          | 13.8 KB | 0 Bytes |
| └─Projection_28                                                            | 2406.00      | 175       | root         |                | time:21.2s, loops:2, Concurrency:5                                                                      | test.nation.n_name, Column#53, Column#55                                                                                                                                                                                    | 34.0 KB | N/A     |
|   └─TableReader_117                                                        | 2406.00      | 175       | root         |                | time:21.2s, loops:2, cop_task: {num: 2, max: 0s, min: 0s, avg: 0s, p95: 0s, copr_cache_hit_ratio: 0.00} | data:ExchangeSender_116                                                                                                                                                                                                     | N/A     | N/A     |
|     └─ExchangeSender_116                                                   | 2406.00      | 175       | mpp[tiflash] |                | tiflash_task:{time:21.2s, loops:1, threads:20}                                                          | ExchangeType: PassThrough                                                                                                                                                                                                   | N/A     | N/A     |
|       └─Projection_112                                                     | 2406.00      | 175       | mpp[tiflash] |                | tiflash_task:{time:21.2s, loops:1, threads:20}                                                          | Column#55, test.nation.n_name, Column#53                                                                                                                                                                                    | N/A     | N/A     |
|         └─HashAgg_113                                                      | 2406.00      | 175       | mpp[tiflash] |                | tiflash_task:{time:21.2s, loops:1, threads:1}                                                           | group by:Column#58, test.nation.n_name, funcs:sum(Column#59)->Column#55, funcs:firstrow(test.nation.n_name)->test.nation.n_name, funcs:firstrow(Column#58)->Column#53                                                       | N/A     | N/A     |
|           └─ExchangeReceiver_115                                           | 2406.00      | 175       | mpp[tiflash] |                | tiflash_task:{time:21.2s, loops:20, threads:20}                                                         |                                                                                                                                                                                                                             | N/A     | N/A     |
|             └─ExchangeSender_114                                           | 2406.00      | 175       | mpp[tiflash] |                | tiflash_task:{time:15.7s, loops:256, threads:20}                                                        | ExchangeType: HashPartition, Hash Cols: [name: test.nation.n_name, collate: N/A]                                                                                                                                            | N/A     | N/A     |
|               └─HashAgg_33                                                 | 2406.00      | 175       | mpp[tiflash] |                | tiflash_task:{time:15.7s, loops:256, threads:1}                                                         | group by:Column#67, Column#68, funcs:sum(Column#66)->Column#59                                                                                                                                                              | N/A     | N/A     |
|                 └─Projection_122                                           | 218316944.80 | 16275040  | mpp[tiflash] |                | tiflash_task:{time:15.5s, loops:1546, threads:20}                                                       | minus(mul(test.lineitem.l_extendedprice, minus(1, test.lineitem.l_discount)), mul(test.partsupp.ps_supplycost, test.lineitem.l_quantity))->Column#66, test.nation.n_name, extract(YEAR, test.orders.o_orderdate)->Column#68 | N/A     | N/A     |
|                   └─Projection_111                                         | 218316944.80 | 16275040  | mpp[tiflash] |                | tiflash_task:{time:15.3s, loops:1546, threads:20}                                                       | test.lineitem.l_quantity, test.lineitem.l_extendedprice, test.lineitem.l_discount, test.partsupp.ps_supplycost, test.orders.o_orderdate, test.nation.n_name                                                                 | N/A     | N/A     |
|                     └─HashJoin_105                                         | 218316944.80 | 16275040  | mpp[tiflash] |                | tiflash_task:{time:15.3s, loops:1546, threads:20}                                                       | inner join, equal:[eq(test.lineitem.l_orderkey, test.orders.o_orderkey)]                                                                                                                                                    | N/A     | N/A     |
|                       ├─ExchangeReceiver_67(Build)                         | 75000000.00  | 75000000  | mpp[tiflash] |                | tiflash_task:{time:184ms, loops:1167, threads:20}                                                       |                                                                                                                                                                                                                             | N/A     | N/A     |
|                       │ └─ExchangeSender_66                                | 75000000.00  | 75000000  | mpp[tiflash] |                | tiflash_task:{time:5.57s, loops:1168, threads:20}                                                       | ExchangeType: HashPartition, Hash Cols: [name: test.orders.o_orderkey, collate: N/A]                                                                                                                                        | N/A     | N/A     |
|                       │   └─TableFullScan_65                               | 75000000.00  | 75000000  | mpp[tiflash] | table:orders   | tiflash_task:{time:187.4ms, loops:1168, threads:20}                                                     | keep order:false                                                                                                                                                                                                            | N/A     | N/A     |
|                       └─ExchangeReceiver_64(Probe)                         | 215138902.12 | 16275040  | mpp[tiflash] |                | tiflash_task:{time:14.4s, loops:1546, threads:20}                                                       |                                                                                                                                                                                                                             | N/A     | N/A     |
|                         └─ExchangeSender_63                                | 215138902.12 | 16275040  | mpp[tiflash] |                | tiflash_task:{time:18.3s, loops:1546, threads:20}                                                       | ExchangeType: HashPartition, Hash Cols: [name: test.lineitem.l_orderkey, collate: N/A]                                                                                                                                      | N/A     | N/A     |
|                           └─HashJoin_39                                    | 215138902.12 | 16275040  | mpp[tiflash] |                | tiflash_task:{time:16.3s, loops:1546, threads:20}                                                       | inner join, equal:[eq(test.lineitem.l_suppkey, test.partsupp.ps_suppkey) eq(test.lineitem.l_partkey, test.partsupp.ps_partkey)]                                                                                             | N/A     | N/A     |
|                             ├─ExchangeReceiver_62(Build)                   | 40000000.00  | 40000000  | mpp[tiflash] |                | tiflash_task:{time:162.1ms, loops:624, threads:20}                                                      |                                                                                                                                                                                                                             | N/A     | N/A     |
|                             │ └─ExchangeSender_61                          | 40000000.00  | 40000000  | mpp[tiflash] |                | tiflash_task:{time:2.73s, loops:624, threads:20}                                                        | ExchangeType: HashPartition, Hash Cols: [name: test.partsupp.ps_suppkey, collate: N/A], [name: test.partsupp.ps_partkey, collate: N/A]                                                                                      | N/A     | N/A     |
|                             │   └─TableFullScan_60                         | 40000000.00  | 40000000  | mpp[tiflash] | table:partsupp | tiflash_task:{time:173ms, loops:624, threads:20}                                                        | keep order:false                                                                                                                                                                                                            | N/A     | N/A     |
|                             └─ExchangeReceiver_59(Probe)                   | 212767899.31 | 16275040  | mpp[tiflash] |                | tiflash_task:{time:14.9s, loops:1546, threads:20}                                                       |                                                                                                                                                                                                                             | N/A     | N/A     |
|                               └─ExchangeSender_58                          | 212767899.31 | 16275040  | mpp[tiflash] |                | tiflash_task:{time:21.2s, loops:4666, threads:20}                                                       | ExchangeType: HashPartition, Hash Cols: [name: test.lineitem.l_suppkey, collate: N/A], [name: test.lineitem.l_partkey, collate: N/A]                                                                                        | N/A     | N/A     |
|                                 └─HashJoin_40                              | 212767899.31 | 16275040  | mpp[tiflash] |                | tiflash_task:{time:18.4s, loops:4666, threads:20}                                                       | inner join, equal:[eq(test.lineitem.l_partkey, test.part.p_partkey)]                                                                                                                                                        | N/A     | N/A     |
|                                   ├─ExchangeReceiver_57(Build)             | 8000000.00   | 542583    | mpp[tiflash] |                | tiflash_task:{time:550.7ms, loops:62, threads:20}                                                       |                                                                                                                                                                                                                             | N/A     | N/A     |
|                                   │ └─ExchangeSender_56                    | 8000000.00   | 542583    | mpp[tiflash] |                | tiflash_task:{time:544.2ms, loops:186, threads:20}                                                      | ExchangeType: HashPartition, Hash Cols: [name: test.part.p_partkey, collate: N/A]                                                                                                                                           | N/A     | N/A     |
|                                   │   └─Selection_55                       | 8000000.00   | 542583    | mpp[tiflash] |                | tiflash_task:{time:426.2ms, loops:186, threads:20}                                                      | like(test.part.p_name, "%dim%", 92)                                                                                                                                                                                         | N/A     | N/A     |
|                                   │     └─TableFullScan_54                 | 10000000.00  | 10000000  | mpp[tiflash] | table:part     | tiflash_task:{time:351.2ms, loops:186, threads:20}                                                      | keep order:false                                                                                                                                                                                                            | N/A     | N/A     |
|                                   └─ExchangeReceiver_53(Probe)             | 265044121.10 | 300005811 | mpp[tiflash] |                | tiflash_task:{time:12.9s, loops:4666, threads:20}                                                       |                                                                                                                                                                                                                             | N/A     | N/A     |
|                                     └─ExchangeSender_52                    | 265044121.10 | 300005811 | mpp[tiflash] |                | tiflash_task:{time:21.1s, loops:4666, threads:20}                                                       | ExchangeType: HashPartition, Hash Cols: [name: test.lineitem.l_partkey, collate: N/A]                                                                                                                                       | N/A     | N/A     |
|                                       └─HashJoin_41                        | 265044121.10 | 300005811 | mpp[tiflash] |                | tiflash_task:{time:15.1s, loops:4666, threads:20}                                                       | inner join, equal:[eq(test.supplier.s_suppkey, test.lineitem.l_suppkey)]                                                                                                                                                    | N/A     | N/A     |
|                                         ├─ExchangeReceiver_48(Build)       | 440516.00    | 500000    | mpp[tiflash] |                | tiflash_task:{time:184.7ms, loops:8, threads:20}                                                        |                                                                                                                                                                                                                             | N/A     | N/A     |
|                                         │ └─ExchangeSender_47              | 440516.00    | 500000    | mpp[tiflash] |                | tiflash_task:{time:160.4ms, loops:8, threads:20}                                                        | ExchangeType: HashPartition, Hash Cols: [name: test.supplier.s_suppkey, collate: N/A]                                                                                                                                       | N/A     | N/A     |
|                                         │   └─HashJoin_42                  | 440516.00    | 500000    | mpp[tiflash] |                | tiflash_task:{time:119.4ms, loops:8, threads:20}                                                        | inner join, equal:[eq(test.nation.n_nationkey, test.supplier.s_nationkey)]                                                                                                                                                  | N/A     | N/A     |
|                                         │     ├─ExchangeReceiver_45(Build) | 25.00        | 25        | mpp[tiflash] |                | tiflash_task:{time:25.4ms, loops:1, threads:20}                                                         |                                                                                                                                                                                                                             | N/A     | N/A     |
|                                         │     │ └─ExchangeSender_44        | 25.00        | 25        | mpp[tiflash] |                | tiflash_task:{time:8.75ms, loops:1, threads:1}                                                          | ExchangeType: Broadcast                                                                                                                                                                                                     | N/A     | N/A     |
|                                         │     │   └─TableFullScan_43       | 25.00        | 25        | mpp[tiflash] | table:nation   | tiflash_task:{time:8.75ms, loops:1, threads:1}                                                          | keep order:false                                                                                                                                                                                                            | N/A     | N/A     |
|                                         │     └─TableFullScan_46(Probe)    | 500000.00    | 500000    | mpp[tiflash] | table:supplier | tiflash_task:{time:70.4ms, loops:8, threads:1}                                                          | keep order:false                                                                                                                                                                                                            | N/A     | N/A     |
|                                         └─ExchangeReceiver_51(Probe)       | 300005811.00 | 300005811 | mpp[tiflash] |                | tiflash_task:{time:604.7ms, loops:4666, threads:20}                                                     |                                                                                                                                                                                                                             | N/A     | N/A     |
|                                           └─ExchangeSender_50              | 300005811.00 | 300005811 | mpp[tiflash] |                | tiflash_task:{time:20.7s, loops:4666, threads:20}                                                       | ExchangeType: HashPartition, Hash Cols: [name: test.lineitem.l_suppkey, collate: N/A]                                                                                                                                       | N/A     | N/A     |
|                                             └─TableFullScan_49             | 300005811.00 | 300005811 | mpp[tiflash] | table:lineitem | tiflash_task:{time:1.27s, loops:4666, threads:20}                                                       | keep order:false                                                                                                                                                                                                            | N/A     | N/A     |
+----------------------------------------------------------------------------+--------------+-----------+--------------+----------------+---------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------+

3. What did you see instead (Required)


Nightly Execution Plans
Olap_Detail_Log_ID: 2493410   Plan_Digest: 9954b90de26f93893875427153227b6f Elapsed_Time (s): 506.3 

+--------------------------------------------------------+--------------+-----------+--------------+----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+
| ID                                                     | ESTROWS      | ACTROWS   | TASK         | ACCESS OBJECT  | EXECUTION INFO                                                                                                                                                                                                                                                                                                                                                                                                   | OPERATOR INFO                                                                                                                                                                                                                                                                                      | MEMORY   | DISK    |
+--------------------------------------------------------+--------------+-----------+--------------+----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+
| Sort_26                                                | 2406.00      | 175       | root         |                | time:8m26.3s, loops:2                                                                                                                                                                                                                                                                                                                                                                                            | test.nation.n_name, Column#53:desc                                                                                                                                                                                                                                                                 | 18.4 KB  | 0 Bytes |
| └─Projection_28                                        | 2406.00      | 175       | root         |                | time:8m26.3s, loops:6, Concurrency:5                                                                                                                                                                                                                                                                                                                                                                             | test.nation.n_name, Column#53, Column#55                                                                                                                                                                                                                                                           | 29.0 KB  | N/A     |
|   └─HashAgg_31                                         | 2406.00      | 175       | root         |                | time:8m26.3s, loops:6, partial_worker:{wall_time:8m26.332914899s, concurrency:5, task_num:15894, tot_wait:42m4.137052976s, tot_exec:7.518756175s, tot_time:42m11.662802437s, max:8m26.332852279s, p95:8m26.332852279s}, final_worker:{wall_time:8m26.332973603s, concurrency:5, task_num:25, tot_wait:42m11.663382203s, tot_exec:1.31106ms, tot_time:42m11.664702126s, max:8m26.332962553s, p95:8m26.332962553s} | group by:Column#69, Column#70, funcs:sum(Column#66)->Column#55, funcs:firstrow(Column#67)->test.nation.n_name, funcs:firstrow(Column#68)->Column#53                                                                                                                                                | 1.51 MB  | N/A     |
|     └─Projection_122                                   | 217621131.27 | 16275040  | root         |                | time:8m26.3s, loops:15895, Concurrency:5                                                                                                                                                                                                                                                                                                                                                                         | minus(mul(test.lineitem.l_extendedprice, minus(1, test.lineitem.l_discount)), mul(test.partsupp.ps_supplycost, test.lineitem.l_quantity))->Column#66, test.nation.n_name, extract(YEAR, test.orders.o_orderdate)->Column#68, test.nation.n_name, extract(YEAR, test.orders.o_orderdate)->Column#70 | 1.59 MB  | N/A     |
|       └─Projection_35                                  | 217621131.27 | 16275040  | root         |                | time:8m26.3s, loops:15895, Concurrency:5                                                                                                                                                                                                                                                                                                                                                                         | test.lineitem.l_quantity, test.lineitem.l_extendedprice, test.lineitem.l_discount, test.partsupp.ps_supplycost, test.orders.o_orderdate, test.nation.n_name                                                                                                                                        | 2.02 MB  | N/A     |
|         └─HashJoin_37                                  | 217621131.27 | 16275040  | root         |                | time:8m9.3s, loops:15895, build_hash_table:{total:1m2s, fetch:480.4ms, build:1m1.5s}, probe:{concurrency:5, total:42m11.6s, max:8m26.3s, probe:8m45.1s, fetch:33m26.5s}                                                                                                                                                                                                                                          | inner join, equal:[eq(test.lineitem.l_orderkey, test.orders.o_orderkey)]                                                                                                                                                                                                                           | 6.72 GB  | 2.79 GB |
|           ├─TableReader_102(Build)                     | 75000000.00  | 75000000  | root         |                | time:453.2ms, loops:73295, cop_task: {num: 109, max: 465.7ms, min: 8.34ms, avg: 146.8ms, p95: 330.9ms, rpc_num: 109, rpc_time: 16s, copr_cache_hit_ratio: 0.00}                                                                                                                                                                                                                                                  | data:TableFullScan_101                                                                                                                                                                                                                                                                             | 160.4 MB | N/A     |
|           │ └─TableFullScan_101                        | 75000000.00  | 75000000  | cop[tiflash] | table:orders   | tiflash_task:{proc max:93.2ms, min:3.05ms, p80:32.2ms, p95:65ms, iters:1409, tasks:109, threads:109}                                                                                                                                                                                                                                                                                                             | keep order:false                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|           └─HashJoin_71(Probe)                         | 214453217.56 | 16275040  | root         |                | time:6m22.9s, loops:15896, build_hash_table:{total:25.3s, fetch:626.3ms, build:24.7s}, probe:{concurrency:5, total:42m11.6s, max:8m26.3s, probe:40m5.1s, fetch:2m6.5s}                                                                                                                                                                                                                                           | inner join, equal:[eq(test.lineitem.l_suppkey, test.partsupp.ps_suppkey) eq(test.lineitem.l_partkey, test.partsupp.ps_partkey)]                                                                                                                                                                    | 4.94 GB  | 3.28 GB |
|             ├─TableReader_100(Build)                   | 40000000.00  | 40000000  | root         |                | time:651.2ms, loops:39105, cop_task: {num: 74, max: 926.6ms, min: 4.73ms, avg: 361.5ms, p95: 827.7ms, rpc_num: 74, rpc_time: 26.7s, copr_cache_hit_ratio: 0.00}                                                                                                                                                                                                                                                  | data:TableFullScan_99                                                                                                                                                                                                                                                                              | 442.6 MB | N/A     |
|             │ └─TableFullScan_99                       | 40000000.00  | 40000000  | cop[tiflash] | table:partsupp | tiflash_task:{proc max:113.8ms, min:2.71ms, p80:36ms, p95:70.9ms, iters:798, tasks:74, threads:74}                                                                                                                                                                                                                                                                                                               | keep order:false                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|             └─HashJoin_76(Probe)                       | 212089771.54 | 16275040  | root         |                | time:595.1ms, loops:15898, build_hash_table:{total:470.7ms, fetch:232.9ms, build:237.8ms}, probe:{concurrency:5, total:42m11.5s, max:8m26.3s, probe:41m58.5s, fetch:13s}                                                                                                                                                                                                                                         | inner join, equal:[eq(test.lineitem.l_partkey, test.part.p_partkey)]                                                                                                                                                                                                                               | 64.5 MB  | 0 Bytes |
|               ├─TableReader_98(Build)                  | 8000000.00   | 542583    | root         |                | time:238.1ms, loops:541, cop_task: {num: 17, max: 428.6ms, min: 29.6ms, avg: 286.8ms, p95: 428.6ms, rpc_num: 17, rpc_time: 4.88s, copr_cache_hit_ratio: 0.00}                                                                                                                                                                                                                                                    | data:Selection_97                                                                                                                                                                                                                                                                                  | 9.95 MB  | N/A     |
|               │ └─Selection_97                         | 8000000.00   | 542583    | cop[tiflash] |                | tiflash_task:{proc max:344.8ms, min:4.63ms, p80:319.6ms, p95:344.8ms, iters:188, tasks:17, threads:17}                                                                                                                                                                                                                                                                                                           | like(test.part.p_name, "%dim%", 92)                                                                                                                                                                                                                                                                | N/A      | N/A     |
|               │   └─TableFullScan_96                   | 10000000.00  | 10000000  | cop[tiflash] | table:part     | tiflash_task:{proc max:275ms, min:4.63ms, p80:248.6ms, p95:275ms, iters:188, tasks:17, threads:17}                                                                                                                                                                                                                                                                                                               | keep order:false                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|               └─TableReader_84(Probe)                  | 264199380.05 | 300005811 | root         |                | time:5.52s, loops:293058, cop_task: {num: 4676, max: 0s, min: 0s, avg: 0s, p95: 0s, copr_cache_hit_ratio: 0.00}                                                                                                                                                                                                                                                                                                  | data:ExchangeSender_83                                                                                                                                                                                                                                                                             | N/A      | N/A     |
|                 └─ExchangeSender_83                    | 264199380.05 | 300005811 | mpp[tiflash] |                | tiflash_task:{time:1m25.4s, loops:4675, threads:20}                                                                                                                                                                                                                                                                                                                                                              | ExchangeType: PassThrough                                                                                                                                                                                                                                                                          | N/A      | N/A     |
|                   └─HashJoin_80                        | 264199380.05 | 300005811 | mpp[tiflash] |                | tiflash_task:{time:8.23s, loops:4675, threads:20}                                                                                                                                                                                                                                                                                                                                                                | inner join, equal:[eq(test.supplier.s_suppkey, test.lineitem.l_suppkey)]                                                                                                                                                                                                                           | N/A      | N/A     |
|                     ├─ExchangeReceiver_48(Build)       | 439112.00    | 500000    | mpp[tiflash] |                | tiflash_task:{time:147.8ms, loops:8, threads:20}                                                                                                                                                                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                    | N/A      | N/A     |
|                     │ └─ExchangeSender_47              | 439112.00    | 500000    | mpp[tiflash] |                | tiflash_task:{time:137ms, loops:8, threads:20}                                                                                                                                                                                                                                                                                                                                                                   | ExchangeType: HashPartition, Hash Cols: [name: test.supplier.s_suppkey, collate: N/A]                                                                                                                                                                                                              | N/A      | N/A     |
|                     │   └─HashJoin_42                  | 439112.00    | 500000    | mpp[tiflash] |                | tiflash_task:{time:123ms, loops:8, threads:20}                                                                                                                                                                                                                                                                                                                                                                   | inner join, equal:[eq(test.nation.n_nationkey, test.supplier.s_nationkey)]                                                                                                                                                                                                                         | N/A      | N/A     |
|                     │     ├─ExchangeReceiver_45(Build) | 25.00        | 25        | mpp[tiflash] |                | tiflash_task:{time:47ms, loops:1, threads:20}                                                                                                                                                                                                                                                                                                                                                                    |                                                                                                                                                                                                                                                                                                    | N/A      | N/A     |
|                     │     │ └─ExchangeSender_44        | 25.00        | 25        | mpp[tiflash] |                | tiflash_task:{time:10.3ms, loops:1, threads:1}                                                                                                                                                                                                                                                                                                                                                                   | ExchangeType: Broadcast                                                                                                                                                                                                                                                                            | N/A      | N/A     |
|                     │     │   └─TableFullScan_43       | 25.00        | 25        | mpp[tiflash] | table:nation   | tiflash_task:{time:10.3ms, loops:1, threads:1}                                                                                                                                                                                                                                                                                                                                                                   | keep order:false                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|                     │     └─TableFullScan_46(Probe)    | 500000.00    | 500000    | mpp[tiflash] | table:supplier | tiflash_task:{time:90ms, loops:8, threads:1}                                                                                                                                                                                                                                                                                                                                                                     | keep order:false                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
|                     └─ExchangeReceiver_51(Probe)       | 300005811.00 | 300005811 | mpp[tiflash] |                | tiflash_task:{time:403.8ms, loops:4675, threads:20}                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                    | N/A      | N/A     |
|                       └─ExchangeSender_50              | 300005811.00 | 300005811 | mpp[tiflash] |                | tiflash_task:{time:1m22.8s, loops:4676, threads:20}                                                                                                                                                                                                                                                                                                                                                              | ExchangeType: HashPartition, Hash Cols: [name: test.lineitem.l_suppkey, collate: N/A]                                                                                                                                                                                                              | N/A      | N/A     |
|                         └─TableFullScan_49             | 300005811.00 | 300005811 | mpp[tiflash] | table:lineitem | tiflash_task:{time:1.04s, loops:4676, threads:20}                                                                                                                                                                                                                                                                                                                                                                | keep order:false                                                                                                                                                                                                                                                                                   | N/A      | N/A     |
+--------------------------------------------------------+--------------+-----------+--------------+----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+

4. What is your TiDB version? (Required)

commit 588edc4

@Yui-Song Yui-Song added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner severity/critical labels Jun 24, 2022
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 labels Jun 24, 2022
@qw4990 qw4990 removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.1 labels Jun 24, 2022
@qw4990
Copy link
Contributor

qw4990 commented Jun 24, 2022

Fixed by #35707

@qw4990 qw4990 closed this as completed Jun 24, 2022
@AilinKid AilinKid changed the title HashAgg fails to be push-downed to TiFlash resulting in performance regression in THCH and TPCDS HashAgg fails to be push-downed to TiFlash resulting in performance regression in TPCH and TPCDS Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/critical sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants