Hive 中 sort by 和 order by 的区别

order by会对输入做全局排序,因此只有1个reducer(多个reducer无法保证全局有序),会导致当输入规模较大时,需要较长的计算时间。

sort by不是全局排序,其在数据进入 reducer 前完成排序。

因此,如果用 sort by 进行排序,并且设置 mapred.reduce.tasks>1, 则 sort by 只保证每个 reducer 的输出有序,不保证全局有序


我们下期见,拜拜!

相关推荐
fastjson_1 天前
Hive 自定义函数
数据仓库·hive·hadoop
Gent_倪1 天前
MySQL 与 Hive 语法异同点详解
数据库·hive·mysql
邀星月为媒4 天前
从零打造一个属于自己的 AI Agent:Core Hive Agent 开源项目解析
人工智能·hive·开源
BI专家之路4 天前
安装linux/hadoop/jdk/hive
linux·hive·hadoop
fastjson_6 天前
Hive 基础函数
数据仓库·hive·hadoop
邀星月为媒9 天前
正式迁移 Gitee:core-site-hive 与 core-hive-agent 后续更新只认这两个地址
hive·hadoop·gitee
fastjson_10 天前
Hive 复杂数据类型
数据仓库·hive·hadoop
hopsky10 天前
《Hive性能调优实战》核心内容详细解读
数据仓库·hive·hadoop
赤土 炙焱23 天前
hiveserver2启动失败,磁盘满了
hive·hadoop
Francek Chen23 天前
【大数据处理与分析】数据仓库Hive:02 数据湖
大数据·数据仓库·hive·hadoop·分布式·数据分析