customNum=100 orderNum=200 rm tmp rm custom.sql for i in `seq $customNum`; do uuid=$(uuidgen) echo $uuid >> tmp done ## custom.sql文件为向t_custom表插入数据的sql awk -v LINE_NUM=$customNum 'BEGIN{ srand(); for(i=1;i<=
rollup函数使用sort耗时长,总耗时达到50s(即17号-20号算子的总耗时),(并行度32的情况下),20号算子Vector sort达24s,19号算子Vector Sore Aggregate达9s,18号算子做重分布达10s,17号算子hashagg达到8s。因此需要考虑对rollup类的分析函数考虑使用其它方式进行优化,比如用hashagg替代sortagg,避免大数据量排序性能降低。
doris Aggregate查询rollup explain 查询 使用expalin作为前缀可以查看当前sql语句的执行效率,以便于优化sql语句。explain的参数主要有十个分别为:id、select_type、table、type、possible_keys、key、key_len、ref、rows、Extra。 1. explain的作用: 例如: 1、id:id的值越大则代表越先执行。 2、select_type:常见的...
AGGREGATION:Operators and steps used for queries that involve aggregate functions and GROUP BY operations. AggregateaggrOperator/step for scalar aggregate functions. HashAggregateaggrOperator/step for grouped aggregate functions. Can operate from disk by virtue of hash table spilling to disk. ...
It can be an aggregate function or a combination of multiple aggregate functions. In SQL statements, aggregate operators are classified into the following types: GroupAggregate: Data has been pre-sorted based on the GROUP BY clause. HashAggregate: Data is hash-calculated, distributed to ...
ReduceGroups the input rows by some scalar expressions, reduces each group using some aggregate functions, and produces rows containing the group key and aggregate outputs. Can increase data size:No Uses memory:✅SUM,COUNT, and most other aggregations use a moderate amount of memory (proportional...
EXPLAIN ANALYZE:代表SQL真实的运行计划,相比EXPLAIN会包含更多的实际运行信息,能准确的反映出SQL的执行算子和算子耗时,可以根据算子耗时去做针对性的SQL优化。 说明 从Hologres V1.3.4x版本开始,支持通过EXPLAIN和EXPLAIN ANALYZE查看更加清晰且阅读性更高的执行计划,本文档基于V1.3.4x版本撰写,建议将实例升级至V1.3....