dh-cloud commented on issue #57707: URL: https://github.com/apache/doris/issues/57707#issuecomment-3490185232
> Could you please provide the query profile for these queries? mysql> explain SELECT COUNT(DISTINCT col1, col2) FROM test; +------------------------------------------------------------------------------+ | Explain String(Nereids Planner) | +------------------------------------------------------------------------------+ | PLAN FRAGMENT 0 | | OUTPUT EXPRS: | | COUNT(DISTINCT col1, col2)[#7] | | PARTITION: UNPARTITIONED | | | | HAS_COLO_PLAN_NODE: true | | | | VRESULT SINK | | MYSQL_PROTOCAL | | | | 6:VAGGREGATE (merge finalize)(147) | | | output: count(partial_count(if(col1 IS NULL, NULL, col2))[#6])[#7] | | | group by: | | | sortByGroupKey:false | | | cardinality=1 | | | distribute expr lists: | | | | | 5:VEXCHANGE | | offset: 0 | | distribute expr lists: | | | | PLAN FRAGMENT 1 | | | | PARTITION: HASH_PARTITIONED: col1[#2], col2[#3] | | | | HAS_COLO_PLAN_NODE: true | | | | STREAM DATA SINK | | EXCHANGE ID: 05 | | UNPARTITIONED | | | | 4:VAGGREGATE (update serialize)(139) | | | output: partial_count(if(col1[#4] IS NULL, NULL, col2[#5]))[#6] | | | group by: | | | sortByGroupKey:false | | | cardinality=1 | | | distribute expr lists: col1[#4], col2[#5] | | | | | 3:VAGGREGATE (merge finalize)(135) | | | group by: col1[#2], col2[#3] | | | sortByGroupKey:false | | | cardinality=5 | | | distribute expr lists: col1[#2], col2[#3] | | | | | 2:VEXCHANGE | | offset: 0 | | distribute expr lists: | | | | PLAN FRAGMENT 2 | | | | PARTITION: RANDOM | | | | HAS_COLO_PLAN_NODE: false | | | | STREAM DATA SINK | | EXCHANGE ID: 02 | | HASH_PARTITIONED: col1[#2], col2[#3] | | | | 1:VAGGREGATE (update finalize)(127) | | | STREAMING | | | group by: col1[#0], col2[#1] | | | sortByGroupKey:false | | | cardinality=5 | | | distribute expr lists: | | | | | 0:VOlapScanNode(123) | | TABLE: cloud.test(test), PREAGGREGATION: ON | | partitions=1/1 (test) | | tablets=10/10, tabletList=1761821613823,1761821613827,1761821613831 ... | | cardinality=7, avgRowSize=399.2857, numNodes=3 | | pushAggOp=NONE | | | | | | | | ========== STATISTICS ========== | +------------------------------------------------------------------------------+ 75 rows in set (0.11 sec) mysql> explain SELECT DISTINCT col1, col2 from test; +------------------------------------------------------------------------------+ | Explain String(Nereids Planner) | +------------------------------------------------------------------------------+ | PLAN FRAGMENT 0 | | OUTPUT EXPRS: | | col1[#4] | | col2[#5] | | PARTITION: HASH_PARTITIONED: col1[#2], col2[#3] | | | | HAS_COLO_PLAN_NODE: true | | | | VRESULT SINK | | MYSQL_PROTOCAL | | | | 3:VAGGREGATE (merge finalize)(93) | | | group by: col1[#2], col2[#3] | | | sortByGroupKey:false | | | cardinality=5 | | | distribute expr lists: col1[#2], col2[#3] | | | | | 2:VEXCHANGE | | offset: 0 | | distribute expr lists: | | | | PLAN FRAGMENT 1 | | | | PARTITION: RANDOM | | | | HAS_COLO_PLAN_NODE: false | | | | STREAM DATA SINK | | EXCHANGE ID: 02 | | HASH_PARTITIONED: col1[#2], col2[#3] | | | | 1:VAGGREGATE (update finalize)(85) | | | STREAMING | | | group by: col1[#0], col2[#1] | | | sortByGroupKey:false | | | cardinality=5 | | | distribute expr lists: | | | | | 0:VOlapScanNode(81) | | TABLE: cloud.test(test), PREAGGREGATION: ON | | partitions=1/1 (test) | | tablets=10/10, tabletList=1761821613823,1761821613827,1761821613831 ... | | cardinality=7, avgRowSize=399.2857, numNodes=3 | | pushAggOp=NONE | | | | | | | | ========== STATISTICS ========== | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
