title: Joining two tables (with a many to one relationship) taking long
body: <p>I have two tables, table 1 has a column X, table 2 has a column that relates to column X. </p>
  
  <p>In Table 1 the entries of column X are repeated (i.e entries can be {1,1,2,3,5,4,4,4,9})</p>
  
  <p>In Table 2 the entries that column X are not repeated but all the distinct entries in table 1 appear</p>
  
  <p>So there is one to many relationship</p>
  
  <p>Now I want to join the two tables(as seen below in the code) and the performance is extremely slow! </p>
  
  <p>Any ideas?</p>
  
  <pre><code>&gt; CTE_DE_Normalised AS
          (
              SELECT  *
  
              FROM    Table1 a
  
              JOIN    Table2 b
              ON  a.Id = b.Table1Id
          )
  </code></pre>