我有两张桌子 -
bpm_agent_data - 40 Million records , 5 Columns
bpm_loan_data - 20 Million records, 5 Columns
现在我在Hive中运行了一个查询 -
select count(bpm_agent_data.AgentID), count(bpm_loan_data.LoanNumber) from bpm_agent_data JOIN bpm_loan_data where bpm_loan_data.id = bpm_agent_data.id;
需要很长时间才能完成。 在HIVE中编写查询的理想方法应该是什么,以便Reducer不必花费那么多时间。
答案 0 :(得分:1)
找到上述查询的解决方案, 替换为ON
select count(bpm_agent_data.AgentID), count(bpm_loan_data.LoanNumber) from bpm_agent_data JOIN bpm_loan_data ON( bpm_loan_data.id = bpm_agent_data.id);