title: Joining two tables using column which has duplicate values, master -lookup tables
body: <p>I have a table (x) which has 9 million rows and one of its columns is cosub which has repeating duplicate values, there is another table (y) which has related details for cosub 
  it has 59k rows and additional columns that provide details related to cosub (acting as lookup table)
  how can i join the two tables, querying 9 million rows and selecting from table (y) additional details of cosub.
  example:</p>
  
  <pre>Table x      table y 
  id cosub    cosub div 
  
  1   A        B     6
  2   B        A     5
  3   C        C     7
  4   A        A     5
  5   B        B     6
  6   C        A     5
  .....................
  </pre>
  
  <p>the result of the query should look like this (selecting all 9 million rows from table x)</p>
  
  <p>1 A 5 <br/>
  2 B 6 <br/>
  3 C 7 <br/>
  4 A 5 <br/>
  5 B 6 <br/>
  6 C 7</p>