-
Notifications
You must be signed in to change notification settings - Fork 409
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 aggregation query hangs when mpp is on #1586
Labels
Milestone
Comments
Original: mysql> desc PK_multi_col_873;
+-------+---------------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------+------+------+---------+-------+
| COL1 | longblob | NO | PRI | NULL | |
| COL2 | mediumint(21) | NO | PRI | NULL | |
| COL3 | timestamp | NO | PRI | NULL | |
+-------+---------------+------+------+---------+-------+
3 rows in set (0.34 sec)
mysql> explain select avg(col1) from PK_MULTI_COL_873 group by col1;
+----------------------------+---------+--------------+------------------------+-----------------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+----------------------------+---------+--------------+------------------------+-----------------------------------------------------------------------------------+
| HashAgg_7 | 81.60 | root | | group by:Column#9, funcs:avg(Column#8)->Column#5 |
| └─Projection_18 | 102.00 | root | | cast(td.pk_multi_col_873.col1, double BINARY)->Column#8, td.pk_multi_col_873.col1 |
| └─TableReader_17 | 102.00 | root | | data:TableFullScan_16 |
| └─TableFullScan_16 | 102.00 | cop[tiflash] | table:PK_MULTI_COL_873 | keep order:false, stats:pseudo |
+----------------------------+---------+--------------+------------------------+-----------------------------------------------------------------------------------+
4 rows in set (0.01 sec)
mysql> set tidb_allow_mpp=on;
Query OK, 0 rows affected (0.00 sec)
mysql> explain select avg(col1) from PK_MULTI_COL_873 group by col1;
+------------------------------------+---------+-------------------+------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+------------------------------------+---------+-------------------+------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| TableReader_29 | 81.60 | root | | data:ExchangeSender_28 |
| └─ExchangeSender_28 | 81.60 | batchCop[tiflash] | | ExchangeType: PassThrough |
| └─Projection_24 | 81.60 | batchCop[tiflash] | | div(Column#5, cast(case(eq(Column#9, 0), 1, Column#9), double BINARY))->Column#5 |
| └─HashAgg_25 | 81.60 | batchCop[tiflash] | | group by:td.pk_multi_col_873.col1, funcs:sum(Column#10)->Column#9, funcs:sum(Column#11)->Column#5 |
| └─ExchangeReceiver_27 | 81.60 | batchCop[tiflash] | | |
| └─ExchangeSender_26 | 81.60 | batchCop[tiflash] | | ExchangeType: HashPartition, Hash Cols: td.pk_multi_col_873.col1 |
| └─HashAgg_8 | 81.60 | batchCop[tiflash] | | group by:td.pk_multi_col_873.col1, funcs:count(td.pk_multi_col_873.col1)->Column#10, funcs:sum(td.pk_multi_col_873.col1)->Column#11 |
| └─TableFullScan_23 | 102.00 | batchCop[tiflash] | table:PK_MULTI_COL_873 | keep order:false, stats:pseudo |
+------------------------------------+---------+-------------------+------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
8 rows in set (0.00 sec) TiDB log:
It seems TiDB received error of |
Closed by #1533 and pingcap/tidb#23056 |
@leiysky After upgrading the cluster to nightly. The query needs about 2 minutes to return error , and I think it is not as expected.
|
Additional the result is not same between mpp on and mpp off. I open a issue #1589 to record it. |
Closed by #1591 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimal reproduce:
Cluster version:
The text was updated successfully, but these errors were encountered: