hadoop - Optimised Hive query with JOIN , having million records -


मेरे पास 2 टेबल हैं -

  bpm_agent_data - 40 मिलियन रिकॉर्ड, 5 कॉलम bpm_loan_data - 20 लाख रिकॉर्ड, 5 कॉलम  

अब मैंने हाइव में एक प्रश्न चलाया -

  चुनें count (bpm_agent_data.AgentID), count (bpm_loan_data.LoanNumber) bpm_agent_data से JOIN bpm_loan_data जहां bpm_loan_data.id = bpm_agent_data.id;  

जो पूरा करने के लिए लंबा समय ले रहा है। HIVE में क्वेरी लिखने का आदर्श तरीका क्या होना चाहिए ताकि Reducer को इतना समय न लेना चाहिए।

उपरोक्त क्वेरी के लिए समाधान मिला, जहां पर

  काउंट (bpm_agent_data.AgentID), गिनती (bpm_loan_data.LoanNumber) से bpm_agent_data पर जोड़ें bpm_loan_data पर (bpm_loan_data.id = bpm_agent_data.id );  

Comments

Popular posts from this blog

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

sql - PostgreSQL automatically update row at specific date -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -