欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

hive 字段不包含某个字符_hive之面试必问 hive调优

发布时间:2025/5/22 编程问答 37 豆豆
生活随笔 收集整理的这篇文章主要介绍了 hive 字段不包含某个字符_hive之面试必问 hive调优 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

1.Fetch抓取(Hive可以避免进行MapReduce)

Hive中对某些情况的查询可以不必使用MapReduce计算。例如:SELECT * FROM employees;在这种情况下,Hive可以简单地读取employee对应的存储目录下的文件,然后输出查询结果到控制台。

在hive-default.xml.template文件中hive.fetch.task.conversion默认是more,老版本hive默认是minimal,该属性修改为more以后,在全局查找、字段查找、limit查找等都不走mapreduce。

hive.fetch.task.conversionmore

案例实操:

1)把hive.fetch.task.conversion设置成none,然后执行查询语句,都会执行mapreduce程序。

hive (default)> set hive.fetch.task.conversion=none;hive (default)> select * from score;hive (default)> select s_score from score;hive (default)> select s_score from score limit 3;

2)把hive.fetch.task.conversion设置成more,然后执行查询语句,如下查询方式都不会执行mapreduce程序。

hive (default)> set hive.fetch.task.conversion=more;hive (default)> select * from score;hive (default)> sel

总结

以上是生活随笔为你收集整理的hive 字段不包含某个字符_hive之面试必问 hive调优的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。