C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Hive Sort By vs Order ByHive sort by and order by commands are used to fetch data in sorted order. The main differences between sort by and order by commands are given below. Sort by hive> SELECT E.EMP_ID FROM Employee E SORT BY E.empid; May use multiple reducers for final output. Only guarantees ordering of rows within a reducer. May give partially ordered result. Order by hive> SELECT E.EMP_ID FROM Employee E order BY E.empid; Uses single reducer to guarantee total order in output. LIMIT can be used to minimize sort time.
Next TopicHive Join
|