hive 中的排序优化

来源:互联网 发布:js 大数 错误 编辑:程序博客网 时间:2024/04/28 15:18

http://blog.csdn.net/jiedushi/article/details/7651622

在hive中进行字段排序统计过程中,使用ORDER BY是全局排序,hive只能通过一个reduce进行排序.效率很低,采用hive提供的distribute by +sort by或者CLUSTER BY, 这样可以充分利用hadoop资源, 在多个reduce中局部按需要排序的字段进行排序。cluster by等同于distributed by 与sort by 组合。

0 0
原创粉丝点击