title: Performance issue in hive version 0.13.1
body: <p>I use <a href="http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/UsingEMR_SupportedHiveVersions.html" rel="noreferrer">AWS-EMR</a> to run my Hive queries and I have a performance issue while running hive version 0.13.1.</p>
  
  <p>The newer version of hive took around 5 minutes for running 10 rows of data. But the same script for 230804 rows is taking 2 days and is still running. What should I do to analyze and fix the problem?</p>
  
  <p>Sample Data:</p>
  
  <p><strong>Table 1:</strong></p>
  
  <pre><code>hive&gt; describe foo;
  OK
  orderno    string
  Time taken: 0.101 seconds, Fetched: 1 row(s)
  </code></pre>
  
  <blockquote>
    <p>Sample data for table1:</p>
  </blockquote>
  
  <pre><code>hive&gt;select * from foo;        
  OK
  1826203307
  1826207803
  1826179498
  1826179657
  </code></pre>
  
  <p><strong>Table 2:</strong></p>
  
  <pre><code>hive&gt; describe de_geo_ip_logs;
  OK
  id          bigint                                      
  startorderno        bigint                                      
  endorderno          bigint                                      
  itemcode                int                                         
  Time taken: 0.047 seconds, Fetched: 4 row(s)
  </code></pre>
  
  <blockquote>
    <p>Sample data for Table 2:</p>
  </blockquote>
  
  <pre><code>hive&gt; select * from bar;
  
  127698025   417880320   417880575   306
  127698025   3038626048  3038626303  584
  127698025   3038626304  3038626431  269
  127698025   3038626560  3038626815  163
  </code></pre>
  
  <p><strong>My Query:</strong></p>
  
  <pre><code>SELECT b.itemcode
  FROM foo a,  bar b
  WHERE a.orderno BETWEEN b.startorderno AND b.endorderno;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Lbylt.png" alt="Attached the hive logs for the above query."></p>