我是 Hadoop Hive 的新手,我正在开发一个报告解决方案。问题是查询性能真的很慢(hive 0.10,hbase 0.94,hadoop 1.1.1)。查询之一是:
select a.*, b.country, b.city from p_country_town_hotel b
inner join p_hotel_rev_agg_period a on
(a.key.hotel = b.hotel) where b.hotel = 'AdriaPraha' and a.min_date < '20130701'
order by a.min_date desc
limit 10;
这需要相当长的时间(50s)。我知道我知道,连接是在字符串字段上而不是在整数上,但数据集不大(cca 3300 和 100000 条记录)。我尝试了有关此 SQL 的提示,但结果并没有更快。MS SQL Server 上的相同查询持续 1 秒。此外,表中的简单计数(*)持续 7-8 秒,令人震惊(表有 3300 条记录)。我真的不知道是什么问题?有什么想法还是我误解了 Hadoop?