参数优化:
1、set hive.exec.parallel=true; 默认false,开启后可并行跑job
2、set hive.exec.parallel.thread.number=16; 同一个sql允许并行任务的最大线程数
sql语句:
1、collect_list (收集成list数组,需结合group by 使用)
2、distribute by a,b sort by c (根据a,b,排序c)
3、group by a,b
grouping sets (a,b,(a,b))
等价于group by a union group by b union group by a,b
最后
以上就是冷傲雪糕最近收集整理的关于sql整理的全部内容,更多相关sql整理内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复