hadoop优化的配置单元查询,具有数百万条记录

ht4b089n  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(265)

我有两张table-

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;

这需要很长时间才能完成。在配置单元中编写查询的理想方式应该是什么,这样reducer就不会占用那么多时间。

sxpgvts3

sxpgvts31#

找到上述查询的解决方案,将where替换为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);

相关问题